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

Position add on option

Discussion in 'XenForo Development Discussions' started by kalco, Jan 22, 2015.

  1. kalco

    kalco Active Member

    Hi i make one add-on but i have problem with show position.

    options for show add-on: first page OR All page
    I want add-on show above forum title below breadcrumb.

    Any suggestion how to make this.

    Thank you.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's not really clear what you're asking, but you would typically use a template modification to insert your content.
  3. Lawrence

    Lawrence Well-Known Member

    As brogan said, a template modification would work well.

    In development mode create a new option:
    Option Id: aUniqueIdForYourOption
    Add-on: select your add-on from the drop down
    Title: Display on forum home only
    Explanation: Unchecked, will display the data on all pages
    Edit Format: On/Off Check Box
    Data Type: Boolean
    Default Value: 1

    Also select Include this option in back-ups.

    For the template modification:

    Create a new template modification, and select PAGE_CONTAINER for the template
    Find a spot you want your data placed, for example:
    Find: <xen:include template="ad_below_top_breadcrumb" />
    Replace with:
    $0 (this is the find text to be placed back in)
    <xen:if is="{$xenOptions.aUniqueIdForYourOption} && {$contentTemplate} == 'forum_view'">
    your custom data on forum home only
    <xen:else />
    your custom data to show on all pages

Share This Page