Question Passing instance from PHP to Template

Status
Not open for further replies.

Rick

Customer
I have a working version of this code in my template:

Code:
<vb:if condition="$foruminfo['forumid'] == x">{vb:raw show.vbshout_instance1}</vb:if>

If the template contains other html code, it will be displayed even if vBShout doesn't have any output.
I would rather do it in PHP and call the template with a registered variable so I could output nothing at
all or call the template. So I want to set a variable so I can call whichever shout instance I want. However,
in the template I end up with {vb:raw show.vbshout_{vb:raw shout_inst}} where I have preregistered the
template and $shout_inst I can display {vb:raw show_inst} and it is correct. I can use {vb:raw show.instance2}
and that works, but when $show_inst == instance2, and I use {vb:raw show.vbshout_{vb:raw shout_inst}},
I get nada. Does anyone know how to properly include a variable in a vb:raw statement? I could find no clues
in any of the docs or google.

Thank you!
Rick
 
There is unfortunately no way to use a variable within a vb:raw statement like you're trying to do, sorry :(
 
Status
Not open for further replies.

Legacy vBShout

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,174
Customer rating
5.00 star(s) 1 ratings
Back
Top