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

How can I define links depending on the page viewer?

Discussion in 'XenForo Development Discussions' started by rhodes, Jan 2, 2014.

  1. rhodes

    rhodes Active Member


    I've defined a custom tab in my profile page, "Buchregal" (sorry it's German)

    Now I would like to show a link within the "Buchregal" content depending on the user visiting the profile page.

    In the example below Joschka is visiting the admins profile page. In this case I want to show link 1.

    But when the admin visits his profile page himself I would like to add link 2.

    Any ideas how I could do his within my profile tab template?

    Thanks, rhodes

    Bildschirmfoto 2014-01-02 um 13.18.21.png
  2. Brogan

    Brogan XenForo Moderator Staff Member

    <xen:if is="{$visitor.user_id} == {$user.user_id}">
        Link 2
    <xen:else />
        Link 1
  3. rhodes

    rhodes Active Member

    Thank you @Brogan . You made my day!

Share This Page