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

XF 1.3 Conditional to check if forum is filtered by a prefix?

Discussion in 'XenForo Questions and Support' started by Razasharp, Feb 9, 2014.

  1. Razasharp

    Razasharp Well-Known Member

    Anyone know which conditional I need to check if a forum has been filtered by a prefix please?

    The filter code seems to be this:

    	<xen:if hascontent="true">
    		<div class="discussionListFilters secondaryContent">
    			<h3 class="filtersHeading">{xen:phrase filters}:</h3>
    			<dl class="pairsInline filterPairs">
    			<xen:if is="{$displayConditions.prefix_id}">
    				<dt>{xen:phrase prefix}:</dt>
    				<dd><a href="{xen:link forums, $forum, '_params={$pageNavParams}', 'prefix_id='}" class="removeFilter Tooltip" title="{xen:phrase remove_filter}">{xen:helper threadPrefix, $displayConditions.prefix_id, escaped, ''} <span class="gadget">x</span></a></dd>
    			<dl class="pairsInline removeAll">
    				<dt>{xen:phrase remove_all_filters}:</dt>
    				<dd><a href="{xen:link forums, $forum, 'order={$pageNavParams.order}', 'direction={$pageNavParams.direction}'}" class="removeAllFilters Tooltip" title="{xen:phrase remove_all_filters}">x</a></dd>
    But none of those ifs work for me. I just need to check whether a filer has been applied to the forum display page that a user is on. (The same pages that show 'remove filter')

    (Also while I'm at it, any idea on a conditional that lets me know whether the forum has any prefixes or not? Again to use on the forum display page)
    Last edited: Feb 10, 2014
  2. Mike

    Mike XenForo Developer Staff Member

    <xen:if is="{$displayConditions.prefix_id}">
    That should work.
    Divvens likes this.
  3. Razasharp

    Razasharp Well-Known Member

    That's not working for me :(

Share This Page