View Full Version : Sidebar block conditionals..
JMEWLS`
07-16-2010, 04:48 AM
I'm pretty much just trying to change the head color according to the block. It's not working though.
<div style=" background-color:<vb:if condition="$blockid == 13">#2D6294<vb:else />
#C31F26</vb:if>; margin-bottom:10px;">
What should I do to make this work?
JMEWLS`
07-17-2010, 09:36 AM
:( ?
JMEWLS`
07-18-2010, 10:38 AM
:o ..
Lynne
07-18-2010, 02:28 PM
Spit out the variable $blockid first and make sure it works. Is it even registered for use in that template? If not, then you will need to preregister it for that template in order to use it in there (Cellarius wrote a good article in the vB4 articles forum on how to do that).
JMEWLS`
07-20-2010, 08:22 AM
What do you mean by spit out the variable $blockid? I never registered it, don't know how too. I've looked across vbulletin.com for Cellarius' articles. I only came across one.. .
http://www.vbulletin.com/forum/content.php?221-Create-a-custom-PHP-page-in-vB-CMS
Not the one though, I'm guessing.
Lynne
07-20-2010, 08:58 PM
Cellarius' article is here - [HOW TO - vB4] Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)
What I meant about 'spitting' it out, is have it parse the value right there on that page. If you don't think something is working, then take a look at the variables by placing them in the template so you can see what they are.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.