View Full Version : Foruminfo variables and conditionals in header template?
Pitman
02-03-2010, 08:44 PM
Is it still possible to use variables such as $foruminfo[title_clean] and $foruminfo[description] in conditional statements from the header template in 4.x? I've tried several different ways to try to get it to work, but so far have not had much luck.
The following doesn't seem to work from the header template: <vb:if condition="$foruminfo['description']">{vb:raw foruminfo.description}</vb:if>
In 3.8.x I used:<if condition="$foruminfo[title_clean]"><if condition="$foruminfo[description]">
How would I go about recreating these conditional statements for the header template 4.x?
Any help would be extremely appreciated! :)
Thanks
Lynne
02-03-2010, 08:55 PM
I think this has been covered a few times before. If I recall, you will need to preregister the variable for use in that template or use the global variable for it. Try a search to find the other threads about this same issue.
Pitman
02-03-2010, 10:41 PM
Hi Lynne,
Thanks for the suggestion. I looked over all of the threads I could find relating to foruminfo, and even threadinfo, but I wasn't able to figure out how to store the proper value in the preregistered variable.
Pitman
12-28-2010, 04:26 PM
Bump...
I've still had no luck figuring out how to make the $foruminfo variable available in the header template no matter what I do.
I've tried preregistering the variable in several different hook locations (parse_templates, global_start, etc.) but that doesn't seem to have any affect. The variable always gives a blank value.
I am trying to display the forum title and the description of the forum in the header template when viewing forumdisplay and showthread.
Is there any other advice to possibly help me make this happen?
Thanks again!
Lynne
12-28-2010, 04:49 PM
As I said above, you probably need to use globals - $GLOBALS['forumid']. Try that.
Muhammad Rahman
07-31-2013, 03:01 AM
As I said above, you probably need to use globals - $GLOBALS['forumid']. Try that.
---old discussion--
work fine Lynne ...:D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.