• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Default Link to Style Properties

Allan

Well-known member
#1
I would like to link to a specific style properties, is there a link that is the default style used by a site?

My problem is that the link is different if the person is using or not the default style or if he has a debug mode activated.

A variable can be? (As {xen:link login})
 

Allan

Well-known member
#4
A link for the frontend or the acp? You can use xen:adminlink similar to xen:link in the acp.
No, i would like add a link in Options Add-on.

As <a href="admin.php?styles/style-properties&group=my_property" target="_blank">EXAMPLE</a>

But as the style are different on each site, the link never aim the right style.

I thought it existed a way of aiming to default style.
 

Allan

Well-known member
#5
The good link is:

admin.php?styles/default-style.1/style-properties&group=My_property

But the problem is default-style.1
 

Chris D

XenForo developer
Staff member
#6
Code:
{xen:adminlink 'styles/style-properties', {xen:array 'style_id={$xenOptions.defaultStyleId}'}, 'group=My_property'}
Untested but something like that should work.
 

Allan

Well-known member
#7
Code:
{xen:adminlink 'styles/style-properties', {xen:array 'style_id={$xenOptions.defaultStyleId}'}, 'group=My_property'}
Untested but something like that should work.
As ?

<a href="{xen:adminlink 'styles/style-properties', {xen:array 'style_id={$xenOptions.defaultStyleId}'}, 'group=My_property'}" target="_blank">EXAMPLE</a>
 

Chris D

XenForo developer
Staff member
#9
<a href="{xen:adminlink 'styles/style-properties', {xen:array 'style_id={$xenOptions.defaultStyleId}'}, 'group=My_property'}" target="_blank">EXAMPLE</a>
This HTML would only work inside an XF template. The error you posted suggests you've added the HTML outside of the XF template system.
 

Chris D

XenForo developer
Staff member
#11
You can use HTML there, but you can't use XenForo template syntax. Meaning you can't use functions like {xen:link} and other variables.
 

Chris D

XenForo developer
Staff member
#13
Use a named template for the option, you have full control then of the layout of the option, including the ability to be able to use template syntax if required.