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

XF 1.5 how to get a new template to show in another template

Discussion in 'Styling and Customization Questions' started by DieselMinded, Mar 31, 2016.

  1. DieselMinded

    DieselMinded Well-Known Member

    i added this to message user info

    <br />
                    <xen:if is="{$user.customFields.nra}">
    <a><img src="vault/icons/nra.png"></a>
        <xen:if is="{$user.customFields.ccw}">
    <a><img src="vault/icons/ccw.png"></a>
        <xen:if is="{$user.customFields.3per}">
    <a><img src="vault/icons/3per.png"></a>
        <xen:if is="{$user.customFields.Oath}">
    <a><img src="vault/icons/ok.png"></a>
        <xen:if is="{$user.customFields.fb}">
    <a href="{$user.customFields.fb}" target="_new"><img src="vault/icons/fb.png" alt="Facebook"></a>
    <xen:if is="{$user.customFields.youtube}">
    <a href="{$user.customFields.youtube}" target="_new"><img src="vault/icons/yt.png" alt="Youtube"></a>
        <xen:if is="{$user.customFields.group}">
    <a href="{$user.customFields.group}" target="_new"><img src="vault/icons/group.png" alt="My Militia Group"></a>
    to obtain this...


    instead for a having the big string of code in my message user info template , can't i just crate a new template? what would i add on message user info to pull the information from my new template?
  2. wang

    wang Well-Known Member

    You can include your own template inside another template with this code:

    <xen:include template="templateName" />
    DieselMinded likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    DieselMinded likes this.
  4. DieselMinded

    DieselMinded Well-Known Member

    worked thanks

Share This Page