The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I use {vb:raw vboptions.xxx} within CSS template??
Hello everyone, I currently have a slideshow to which I created a couple of options in the admin panel for the admin to be able to control it's width and height easily from the product options, instead of having to go edit style-vars.
The slideshow's width and height are controlled by CSS attributes. I created a custom CSS template and inlciuded it within my page with the slideshow making a call to said template. My problem is apparently it's not reading the CSS correctly using {vb:raw vboptions.xxx} as a replacement for actual values. Here's what I am trying to do: HTML Code:
#slide { position:relative; width:{vb:raw vboptions.cotw_sotw_max_width}px; height:{vb:raw vboptions.cotw_sotw_max_height}px; background:url(images/loading.gif) no-repeat 50% 50%; } HTML Code:
#slide { position:relative; width:500px; height:200px; background:url(images/loading.gif) no-repeat 50% 50%; } Note: I was unsure whether to place this thread here or in Design so if any mod wants to move it by all means. Sorry for the trouble in advance if you do. |
#2
|
||||
|
||||
I used options in my css template for one of my modifications and it worked just fine. What "Data Validation Type" did you select for your option? Is it an Integer?
|
#3
|
|||
|
|||
Quote:
Edited: Doesn't..I checked |
#4
|
|||
|
|||
{vb:raw vboptions.xxx} is working well. try adding ur css code to additional.css template and see if that works
|
#5
|
|||
|
|||
OK it does work when I use the code in additional.css ... How can I use it on my own css template then? It would be a pain to have to ask whoever it is installing this to have to edit their additional.css template right?
|
#6
|
||||
|
||||
Are you adding it to a template that is called xxxx.css? I created my own .css template and I use the settings in there.
|
#7
|
|||
|
|||
Quote:
--------------- Added [DATE]1312739772[/DATE] at [TIME]1312739772[/TIME] --------------- And I am using this to link it in the template: HTML Code:
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}COTW_Adittional.css" />
|
#8
|
|||
|
|||
i just created a new css template and its working well..
where you using this code ? Code:
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}COTW_Adittional.css" /> |
#9
|
|||
|
|||
Yeah I am. Is it correct?
|
#10
|
|||
|
|||
ya code is correct, but you are placing this code in which template ?
i placed my code in headinclude template |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|