| Topic: | Merging two or more blocks |
|---|---|
|
PlanetDeusEx.ru
Registered User
Posts: 1 Posted: |
Hi everyone, i have a question related to blocks: is it possible to merge two or more block contents in one? CS Center Block isn't a good decision because it merges as contents so as designs of that blocks. For example, i want to see past articles and past downloads contents in one main block. How to do this? I asked this question on many forums but i still don't have an exact answer. |
|
nate_02631
Professional
Posts: 3055 Posted: |
You could create a new PHP block with the code to display the blocks manually:CodeNOTE: Replace the # in the pnBlockGetInfo's with the block's bid (see the links in Admin->Blocks)... Also, replace the "story" & "download" with the value under "name" in the same menu, and take notice of the "module" that blocks uses (both of these I happen to know are "Core"). This method will output the blocks in the style of whatever zone they are set up with in the Blocks Admin, but you can override by placing a Code$block['position'] = 'x'; before the blockshow line of each block being outputted. In your theme, in the themesidebox() function, just make sure you have a corresponding position check & HTML for the zone in question -- you aren't even restricted to using "l", "r", & "c"; you can make you own custom output in your theme just for these "combined" blocks. You can also mix regular HTML output with the above code too! -- Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods Cape Cod Travel Info... |
|
Shelby
Helper
Posts: 108 Posted: |
Assume I'm 12 years old. Paint me a picture. Heh. No really though, okay assuming I want to make a new PHP block with the code to display the blocks manually, I'm not sure how I would go about calling out the blocks. Where exactly would I use the code you provided? |
|
Shelby
Helper
Posts: 108 Posted: |
. |
|
nate_02631
Professional
Posts: 3055 Posted: |
nate_02631You could create a new PHP block with the code to display the blocks manually Again, being careful to change the "Core" value to the name of the parent module of the block you are calling... -- Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods Cape Cod Travel Info... |
|
shawngiese
Softmore
Posts: 65 Posted: |
Thanks Nate, you are the king of blocks. This worked great! |