![]() |
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 { HTML Code:
#slide { 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. :) |
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?
|
Quote:
Edited: Doesn't..I checked :) |
{vb:raw vboptions.xxx} is working well. try adding ur css code to additional.css template and see if that works
|
Quote:
|
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.
|
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" /> |
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" /> |
Quote:
|
Quote:
i placed my code in headinclude template |
Quote:
Would it may have to do with the order in which this style sheet is called within the head tags? |
Quote:
try in another browser. |
Quote:
Thank goodness! Thanks for the help everyone. Glad we got this resolved. For future references everyone knows now, clear your cache when in doubt. ;) I should add some small footnote for that option to suggest the user to refresh their cache after changing this option. (just in case you know). Thanks for your time everyone. Best Regards, Nox. P.S.:Would there be a way to force a cache clear of the user changing this option?? Would be better to force this upon the user submitting the change, would make it more idiot-proof ;) . Whatever the case placing a footnote I think should do the trick too. |
Quote:
Problem is not resolve yet mate.. Try changing the value of that option and tell me if there is effect of that change ? (it will not i think) Solution: Create New Plugin Plugin Hook: parse_templates Code: Code:
$templater = vB_Template::create('templatename'); Create a new Template called templatename Code: Code:
<style type ="text/css"> It was interesting and i was also confused. But when i saw css.php file, i got my answer. Code:
header('Cache-control: max-age=31536000'); |
:eek: It did but after I cleared the cache and logged in again...
This works A LOT better, it instantly changes the size of the slider without having to clear cache, of course because now it is automatically rendered with heainclude as soon as the page loads, very smart solution my friend. I wasn't even aware either that you could have a template as CSS and not have to name it like one. Thank you very much for your help. Now it is truly resolved. |
All times are GMT. The time now is 04:55 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:
|