vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Sidebar block conditionals.. (https://vborg.vbsupport.ru/showthread.php?t=246657)

JMEWLS` 07-16-2010 04:48 AM

Sidebar block conditionals..
 
I'm pretty much just trying to change the head color according to the block. It's not working though.

Code:

<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/conte...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

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.


All times are GMT. The time now is 07:51 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
  • Page Generation 0.03018 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete