![]() |
Template Conditional - Shouldnt this work?
This is a snippit of my php code:
PHP Code:
In my template "sitenavdetail", i have the following: HTML Code:
<tr> Problem im having is that its not working. Its still adding the href to everything returned. Can you spot my error? |
try
<if condition="$link['uselink']"> fork kicks, and what templates are you using these in? |
thanks for your response, Zachery. I've already tried your suggestion, but ill give it another go since it was late last night when I tried it.
The templates im using it in are custom ones for my vbadvanced module. It's simply a set of links for a side nav bar. Fields are 'itemtext' (text for the menu item), 'itemurl', 'itembgcode' (specifies the items <td> class) and 'uselink'). This way, I can make a menu (with section headings, and specific bg style) in more of a dynamic route, than just a block of static html. Will try out your suggestion in a few min and get back to ya. [edit] ok, tried it out and Im getting the same results as before. 'uselink' is still returning TRUE (1), even though some fields should be returning FALSE (0). Need to check one more thing as well.... Also made sure the field was SMALLINT with a length of 1. I shouldnt need to do any conversions of this value should I? I mean, it wouldnt be looked at as a string by the conditional and expected to be numerical or anything, would it? [/edit] |
heres everything this module uses...just in case im missing something important elsewhere...but I don't think I am..
module code: PHP Code:
HTML Code:
<!-- Left Nav Block --> HTML Code:
<tr> |
All times are GMT. The time now is 03:27 AM. |
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:
|