![]() |
Weird situation on template condition
1 Attachment(s)
Ok guys, Here's the deal. I'm doing a simple if condition
<vb:if condition="$channelid == $url.channelid"> ....do something Here's the problem, I can't get the two to equal each other. See the screen of the var_dump. {vb:debugvardump $channelid} = string(2) 36 {vb:debugvardump $url.channelid} = string(2) 36 <vb:if condition="$.urlchannelid == 36"> FALSE <vb:if condition="$channelid == 36">TRUE So obviously, there is an issue with $url.channelid. I tried this {vb:set url.channelid, '36'}, still nothing. I'm at a loss here because the two values are equal. |
I'm not too up-to-date regarding the vBulletin 5 template syntax, but shouldn't the template condition be formatted this way:
HTML Code:
<vb:if condition="$channelid == $url['channelid']"> |
Quote:
|
Hmmm maybe it's part of an object?
Try $url->channelid in the condition. |
Can you post the entire code? There might something else going on somewhere.
|
That was most of the code. url.channelid came from an api call and the other was an existing template variable.
I got tired of messing with it, scrapped it and went another direction. |
All times are GMT. The time now is 06:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|