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

Conditional and Template Modification

Discussion in 'XenForo Development Discussions' started by Allan, Apr 29, 2014.

  1. Allan

    Allan Well-Known Member

    Hey :)

    It's possible to use conditional for display a template modification ?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    No. But you can do conditionals IN your template modification.

    Example:

    Find:
    Code:
    <span>Something</span>
    Replace:
    Code:
    <xen:if is="{$visitor.user_id}">
        <span>Something Else</span>
    <xen:else />
        $0
    </xen:if>
    "$0" is shorthand for the stuff you searched for. In that example:
    Code:
    <span>Something Else</span>
    is shown to registered users. No changes are made to guests.
     
    Allan likes this.
  3. Allan

    Allan Well-Known Member

    Thank you for information Chris ;)
     

Share This Page