PDA

View Full Version : Style conditionals in templates?


KW802
09-29-2004, 06:22 PM
Was wondering if anybody has tried this yet yet....

I have several different skins on my site and on one of them I want to dress up the templates a bit but only to the portal, not the actual forums. That means I can't change the default styles in the ACP so I need to change the templates. But I want to do it only for the one specified skin when the template is being viewed.

So.... has anybody tried getting something like this to work yet?{some code}
<if {styleid = x}>
{do something unique to this style}
</if>

:)

Zachery
09-29-2004, 08:13 PM
<if condition="$bbuserifo[styleid] == X">

However, this does not take into account their COOKIES styleid if they use the quick drop down chooser.

Our Sponsors
 

KW802
09-29-2004, 09:42 PM
<if condition="$bbuserifo[styleid] == X">

However, this does not take into account their COOKIES styleid if they use the quick drop down chooser.
Zachery,

Would you mind clarifying the difference between the two? If they choose from the drop down, does it also update the variable?

What my end goal to do was to add some additional border graphics to the VBA templates but for only one of the styles but it sounds like it may not be that easy.

Thanks,
Kevin

Brian
09-29-2004, 09:55 PM
<if condition="$styleid == X"> Code here </if>

Should work...

Our Sponsors
 

Milorad
09-30-2004, 03:09 AM
why not just make the template modification to the actual template in that style?

KW802
09-30-2004, 09:41 AM
why not just make the template modification to the actual template in that style?
:confused: I'm not sure if I'm following you correctly.

The vBadvanced templates are generic, the same ones are used for all of the skins. One of my goals that I said I was trying to achieve was the fact that I only wanted the portal templates to be modified, not the actual style itself as it is used in the forums. If I was to modify the actual style itself then the changes would appear everywhere universally.

Zachery
09-30-2004, 03:46 PM
They are generic in each style untill you customize them ;)

KW802
09-30-2004, 04:39 PM
They are generic in each style untill you customize them ;)
Yeah, yeah.... :p

I might end up not even doing it. For the Vizion skin from ExtremePixels I was contemplating putting some border graphics at the buttom of the tables on the portal to dress them up a but then I got to thinking: "3 graphics per table (left, middle, & right) multiplied by X number of tables used as a module on the portal = ...... hhhhm..... a lot of of img tags!". :o