Bringing in {if} statements as includes
Posted: 17 April 2007 10:10 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  318
Joined  03-07-2006

I seem to be having trouble bringing in elements surrounded by {if} as embedded includes.

e.g.

This is the url http://www.radioexperts.co.uk/index.php/home

An template called variable in the includes template group with this in…

{if segment_1 == "home"}
{assign_variable
:section="home"}
{assign_variable
:page="Homepage"}
{
/if}

Brought into another template like this…

{embed="includes/variable"}

Is this not possible as it doesn’t seem to be working?

Thanks

 Signature 

· Confused… but happy ·

Profile
 
 
Posted: 17 April 2007 10:31 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15833
Joined  06-03-2002

No it is not.  Sub-templates cannot affect things on parent templates.  Embeds are not processed until everything else on the parent template has been fully parsed.

 Signature 
Profile
MSG
 
 
Posted: 17 April 2007 10:34 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  318
Joined  03-07-2006

Cool, OK thanks!

 Signature 

· Confused… but happy ·

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64945 Total Logged-in Users: 66
Total Topics: 81925 Total Anonymous Users: 47
Total Replies: 440358 Total Guests: 295
Total Posts: 522283    
Members ( View Memberlist )