MoB Dudditz MD
05-27-2007, 06:04 PM
~I meant to post this in v3.0~
UPDATED: see bottom
I was attempting to create a single module to interact with various pages.
My pages are set up as different games and I was wanting a review / image module to display for each game.
For instance,
pages are:
Halo
Gears of War
World of Warcraft
My idea is instead of creating a module per page, is creating a single module
with some sort of conditionals within the template to display infoormation depending on what page the user was viewing.
if page is Halo, display Halo image,info and game review.
if page is Gears, display Gears image,info and game review.
if page is Warcraft, display Warcraft image,info and review.
Is there a way to provide a conditional based on the $pages[title] ??
TY
::::::::::::
update
I completed a working module from a conditional to the title.(which must be exact).
However, I am not sure this is the best way to pull this off.
Here is what I came up with:
<if condition="$pages['title'] == 'Page One'">
display information relevant to page one
</if>
<if condition="$pages['title'] == 'Page Two'">
display information relevant to page two
</if>
<if condition="$pages['title'] == 'Page Three'">
display information relevant to page three
</if>
This allows you to have a single information module.
UPDATED: see bottom
I was attempting to create a single module to interact with various pages.
My pages are set up as different games and I was wanting a review / image module to display for each game.
For instance,
pages are:
Halo
Gears of War
World of Warcraft
My idea is instead of creating a module per page, is creating a single module
with some sort of conditionals within the template to display infoormation depending on what page the user was viewing.
if page is Halo, display Halo image,info and game review.
if page is Gears, display Gears image,info and game review.
if page is Warcraft, display Warcraft image,info and review.
Is there a way to provide a conditional based on the $pages[title] ??
TY
::::::::::::
update
I completed a working module from a conditional to the title.(which must be exact).
However, I am not sure this is the best way to pull this off.
Here is what I came up with:
<if condition="$pages['title'] == 'Page One'">
display information relevant to page one
</if>
<if condition="$pages['title'] == 'Page Two'">
display information relevant to page two
</if>
<if condition="$pages['title'] == 'Page Three'">
display information relevant to page three
</if>
This allows you to have a single information module.