NYCPHP Meetup

NYPHP.org

[joomla] modules in mulitple positions

bz-gmort at beezifies.com bz-gmort at beezifies.com
Fri Oct 5 17:38:47 EDT 2007


Rolan Yang wrote:
> I want to place the search module in one position (top) for the front 
> page, but place it at the "right" position for other pages. Is there an 
> easy way to do this? I'm thinking I could create a copy of the search 
> module configure the second one for "right"  or create a copy of the 
> template and and apply it to the front page (swapping out positions for 
> "top" and "right") but I'm wondering if there is an easier way...??

Are you using 1.0 or 1.5?

Are you familiar with how to make collapsible modules?

Generally, a collapsible module position is used when you want modules 
blocks to disappear when they are not published for a page.

However, there are a couple of functions for Joomla that you can use to 
determine if you are on the frontpage or not.

So using those functions, you could make the the two modules appear or 
diappear(assuming they are the only modules in those positions).

IF you have multiple modules in those positions, what I would suggest is 
to use the function to set a variable in the template indicating front 
page or not.

Than just use an if/then clause to load topA/topB and rightA/rightB

Where A is where the module exists for that position, and B is where it 
is not(so you load topA/rightB or topB/rightA)




More information about the Joomla mailing list