- Moderated by:
- Support Team
-
- rank:
-
Registered User
- registered:
- January 2004
- Status:
- offline
- last visit:
- 23.01.04
- Posts:
- 1
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. -
- rank:
-
Professional
- registered:
- September 2003
- Status:
- offline
- last visit:
- 11.04.08
- Posts:
- 3055
You could create a new PHP block with the code to display the blocks manually:
Code
NOTE: 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... -
- rank:
-
Helper
- registered:
- February 2004
- Status:
- offline
- last visit:
- 16.06.06
- Posts:
- 108
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? -
- rank:
-
Professional
- registered:
- September 2003
- Status:
- offline
- last visit:
- 11.04.08
- Posts:
- 3055
nate_02631
You 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...
