{% if style %}

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3269
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

{% if style %}

Post by HiFiKabin » Sun Oct 07, 2018 3:47 pm

Does such a switch exist? I have been looking around and can not find anything.

Reasoning.

I have been asked is I can disable my extension on one style only (that style inherits from prosilver) Lets call that style MyStyle.

One way would be to copy the prosilver directory, naming it MyStyle and empty the files within it, thus calling the blank files in that style

But it would be better I could use a switch that I could then put in the style files {% if not MyStyle %}

... or is there a better way

TiA

User avatar
GanstaZ
Registered User
Posts: 565
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: {% if style %}

Post by GanstaZ » Sun Oct 07, 2018 4:07 pm

Maybe something like this T_TEMPLATE_NAME?
"When answer lies in the question,.. question becomes redundant!"

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3292
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: {% if style %}

Post by kasimi » Sun Oct 07, 2018 4:08 pm

Good news. :D

Code: Select all

{% if user.style.style_name|lower != 'mystyle' %}
    this is not displayed in MyStyle
{% endif %}

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3269
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: {% if style %}

Post by HiFiKabin » Sun Oct 07, 2018 4:15 pm

Thanks Jonas. Perfect

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests