1. 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

Discussion in 'XenForo Development Discussions' started by Allan, Jan 13, 2016.

  1. Allan

    Allan Well-Known Member

    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})
  2. Allan

    Allan Well-Known Member

    Example: admin.php?styles/style-properties&group=my_property

    But work only with debug mod enable.
  3. katsulynx

    katsulynx Well-Known Member

    A link for the frontend or the acp? You can use xen:adminlink similar to xen:link in the acp.
  4. Allan

    Allan Well-Known Member

    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.
  5. Allan

    Allan Well-Known Member

    The good link is:


    But the problem is default-style.1
  6. Chris D

    Chris D XenForo Developer Staff Member

    {xen:adminlink 'styles/style-properties', {xen:array 'style_id={$xenOptions.defaultStyleId}'}, 'group=My_property'}
    Untested but something like that should work.
  7. Allan

    Allan Well-Known Member

    As ?

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

    Allan Well-Known Member

    After test, i have this:

  9. Chris D

    Chris D XenForo Developer Staff Member

    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.
  10. Allan

    Allan Well-Known Member

    In Options add-on:

  11. Chris D

    Chris D XenForo Developer Staff Member

    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.
  12. Allan

    Allan Well-Known Member

    Pity :(

    No other solution in sight?
  13. Chris D

    Chris D XenForo Developer Staff Member

    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.
  14. Allan

    Allan Well-Known Member

    Ok, i will look that, thx ;)

Share This Page