Author Topic: Make Hidden Category "Really" Hidden  (Read 1144 times)

0 Members and 1 Guest are viewing this topic.

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Make Hidden Category "Really" Hidden
« on: May 18, 2012, 04:38:12 PM »
Although the hidden categories do not show up in the url's category list, all hidden categories still show up in the drop-down list for the search function. How do I filter out the hidden cats in this drop-down list?

Answer:You can change the template code for the category <select> field to this:

Code: [Select]
<select name=&quot;c&quot;>
  <option value=&quot;&quot;>All Categories</option>
  {foreach var=$sc from=$search_categories}
  {if $sc.hidden == 0}
  <option value=&quot;{$sc.tag|htmlspecialchars}&quot;>{$sc.name|htmlspecialchars}</option>
  {/if}
  {/foreach}
</select>

Thanks Jeremy
« Last Edit: August 06, 2013, 03:46:15 AM by Chad »

Unofficial JMB Support Forums

Make Hidden Category "Really" Hidden
« on: May 18, 2012, 04:38:12 PM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1251 Views
Last post April 20, 2012, 10:44:18 AM
by a4evermedia
1 Replies
2255 Views
Last post January 29, 2014, 02:34:53 PM
by apollouk
0 Replies
991 Views
Last post August 09, 2013, 06:58:52 PM
by Chad
0 Replies
1020 Views
Last post January 14, 2015, 02:14:20 AM
by JT
0 Replies
1277 Views
Last post January 07, 2016, 10:50:00 PM
by peeperd