Forum

Thread tagged as: Question, Problem, Configuration

Display all list apart from current selected

If have a list and detail page where I want to offer the remaining items in a list apart from the current selected item on the URL product.php?s=my-product.

How can I remove the current item from my list?

The list template is...

    <perch:before>
    <p class="smallprompt">Choose another product...</p>
    </perch:before> 
         <p><a href="?s=<perch:content id="slug" type="slug" />" class="prodBtn" title="<perch:content id="product" type="text"  title="true" label="Type" /> <perch:content id="product" type="text" />">
              <perch:content id="product" type="text" /> →
         </a></p>
    <perch:after>
    </perch:after>
David Owen

David Owen 0 points

  • 4 years ago

...I could hide it using PerchSystem::set_var('current', perch_get('s'));

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.