[joomla] modules in mulitple positions
Rolan Yang
rolan at omnistep.com
Fri Oct 5 21:20:11 EDT 2007
bz-gmort at beezifies.com wrote:
> 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?
1.0
>
> Are you familiar with how to make collapsible modules?
I think my template is collapsible (if there are no modules in the right
position for that page, the main content will expand to fill the space)
>
> 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).
What I want is for a single module (the search module) to appear at the
right position on the front page, and at the top for all the other
pages. As far as I know, with Joomla 1.0, you can only specify a single
position for the module. One idea was to duplicate the module but call
it a different name. One would be positioned on the right (set to be
visible only on the front page), the second module would be positioned
on top and visible on every page other than the front.
The second idea was to duplicate the template except switch the top and
right positions in the template, then apply that modified template to
front page only.
Both ideas are hacks, but I think modifying a template to conditionally
swap the top and right positions based on detection of the front page
would be an even more extreme "hack" in that the template would be doing
something unintuitive even by Joomla standards :)
~Rolan
>
> 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