Dynamic
Well-known member
Hi guys,
Not sure if this poses a security risk or not, but at least for my needs it will come in handy. I am just wondering if it would be possible to add an identifier in the meta data for user groups? This is to apply certain styling properties for small things for certain usergroups rather than creating a new skin. As an example, we already have -
data-app="public"
data-template="forum_post_thread"
data-container-key="node-18"
data-content-key=""
data-logged-in="true"
data-cookie-prefix="xf_"
class="has-no-js template-forum_post_thread"
I'm just wondering if that could output other information such as
data-usergroup1=x
data-usergroup2=y
data-usergroup3=z
etc
This, for example will allow for a header styling for a certain usergroup to turn a certain colour on a certain page without the need for a new skin.
Not sure if it is difficult or not, but it will allow more flexability.
Alternatively is there a way to put conditionals in css or less? For example, if it can see a certain widget is active on the page, and it change the h1 style and display a different style if the widget is not active?
EDIT: Managed to fix this by using <xf:css src="templateX.less" /> within the conditional.
Thanks.
Not sure if this poses a security risk or not, but at least for my needs it will come in handy. I am just wondering if it would be possible to add an identifier in the meta data for user groups? This is to apply certain styling properties for small things for certain usergroups rather than creating a new skin. As an example, we already have -
data-app="public"
data-template="forum_post_thread"
data-container-key="node-18"
data-content-key=""
data-logged-in="true"
data-cookie-prefix="xf_"
class="has-no-js template-forum_post_thread"
I'm just wondering if that could output other information such as
data-usergroup1=x
data-usergroup2=y
data-usergroup3=z
etc
This, for example will allow for a header styling for a certain usergroup to turn a certain colour on a certain page without the need for a new skin.
Not sure if it is difficult or not, but it will allow more flexability.
Alternatively is there a way to put conditionals in css or less? For example, if it can see a certain widget is active on the page, and it change the h1 style and display a different style if the widget is not active?
EDIT: Managed to fix this by using <xf:css src="templateX.less" /> within the conditional.
Thanks.
Last edited:
Upvote
0