Passing a variable to a sub-include
Posted: 06 October 2008 01:31 PM   [ Ignore ]  
Summer Student
Total Posts:  13
Joined  10-06-2008

Hello, I am developing a custom forum theme and need to pass the {topic_title} down to the {include:thread_rows} template.  Is there a way to do this?  I’ve tried to follow http://expressionengine.com/docs/templates/embedding_templates.html but it doesn’t seem to work for {include}s.  Thanks in advance.

Profile
 
 
Posted: 06 October 2008 01:46 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004

The {include:foo} syntax is really only used in forum themes, I think. Unlike regular embeds, no passing of parameters is supported.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 06 October 2008 02:29 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  13
Joined  10-06-2008

Could I change that syntax to use {embed}?  I’m looking for any possible way to access the thread title from the thread row (i.e. post) template.  I’ve tried setting a global variable.  Nothing seems to work so far.

Would an {embed} do the same thing as include?

Thanks

Profile
 
 
Posted: 06 October 2008 02:52 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  13
Joined  10-06-2008

[removed]

Profile
 
 
Posted: 06 October 2008 07:26 PM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32861
Joined  05-14-2004

You can’t use embed instead, the template parser for the discussion forums is a bit different than the main template parser.  Your best bet may be to enable PHP and use PHP to grab the information that you need.

 Signature 
Profile
MSG
 
 
   
 
 
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: 64912 Total Logged-in Users: 31
Total Topics: 81863 Total Anonymous Users: 17
Total Replies: 440097 Total Guests: 178
Total Posts: 521960    
Members ( View Memberlist )
Newest Members:  bjmohrAqua193Bios Elementmjpoteetguimogranwelshmrcfthenetmonkeybenekwhobutsb