

![]() |
| | Thread Tools | Display Modes |
| |||
|
How do you add/remove new sub-categories from this?
|
| |||
| Go to your admin, category management, and on the bottom left click the ? question mark bubble. The trick is to align the category name up exactly with the cat you want to be the parent.
|
| ||||
|
Category management has to be done from Admin panel.
|
| |||
|
Never even knew that was there - thanks guys! Much appreciated.
|
| |||
|
just want show my appreciate here. very useful mod. I'll use it. thanks for your hard work |
| ||||
|
Hi Dollar, Great MoD i have been plying around with it on my test server but i am having a slight headache ![]() The categories will only direct to the published section, when you browse the unpublished page the header categories still link to the published page. ie, index.php and not upcoming.php. Has anyone else experienced this as i imagine that when viewing unpublished pages the header categories should be pointing to the unpublished categories. Any help appreciated guys. Cheers Ads |
| |||
| Quote:
However, like Adaman I am having the same difficulties. I would request Dollars5 to help us out. Thanks again |
| |||
|
@Adaman Adaman, I have managed to slightly modify the Code written by Dollars5 to view the Categories & Subcategories by clicking the Published and Upcoming tabs. The code can be placed in the header.tpl page Hope this helps. Cheers The Code is as follows: {if $pagename eq 'published' || $pagename eq 'upcoming'} {******Get the parent category******} {assign var=requested_cat value=$request_category} {* if story page - set the story's category to this *} {if $pagename eq 'story'} {assign var=requested_cat value='sub'} {/if} {assign var=mainCatStr value=''} {assign var=parentCat value=-1} {section name=thecat loop=$cat_array} {if $cat_array[thecat].safename eq $requested_cat} {if $cat_array[thecat].parent neq 0} {assign var=parentCat value=$cat_array[thecat].parent} {assign var=mainCatStr value=$cat_array[$parentCat].safename} {else} {assign var=parentCat value=$cat_array[thecat].auto_id} {assign var=mainCatStr value=$cat_array[thecat].safename} {/if} {/if} {/section} {********* Displaying the Main categories *******************} <div id="headbar" style="border-bottom:1px solid #ccc;padding-bottom:4px"> {section name=thecat loop=$cat_array} {if $cat_array[thecat].parent eq 0} {if $cat_array[thecat].safename eq $requested_cat || $cat_array[thecat].auto_id eq $parentCat} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {elseif $requested_cat eq "" && $cat_array[thecat].auto_id eq 0} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {else} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {/if} {/if} {/section}</div> <br/> {********* Displaying the Sub categories *******************} <span> {if $parentCat gt 0} <div id= "headbar" style="border-bottom:1px solid #ccc;padding-bottom:4px"> {if $requested_cat eq $mainCatStr} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {else} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {/if} {section name=thecat loop=$cat_array} {if $cat_array[thecat].parent eq $parentCat} {if $cat_array[thecat].safename eq $requested_cat} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {else} {if $pagename eq "published"} <a href="{$URL_maincategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {else} <a href="{$URL_queuedcategory, $cat_array[thecat].safename}" style="padding-bottom:5px;">{$cat_array[thecat].name}</a> {/if} {/if} {/if} {/section} </div> {/if}</span> {elseif $pagename neq 'submit'} <div id="headbar" style="border-bottom:1px solid #ccc;padding-bottom:4px"> {section name=thecat loop=$cat_array} {if $cat_array[thecat].parent eq 0} <a href="{$URL_maincategory, $cat_array[thecat].safename}">{$cat_array[thecat].name}</a> {/if} {/section} <br/> {else}<div id="border" style="border-bottom:6px solid #fff;padding:12px"></div> {/if} </ul></div> ----------------------------------------------------------------------------------- |
| |||
|
I´m using subcategories for geographical order with 10+ subcategories. Is it possible to display the categories in the sidebar as default values of a drop-down list that contains the category and its (indented) subcategories?
|
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [MOD] Submit-step2 Digg like categories selection with radio button | dollars5 | Questions and Comments | 73 | 04-02-2011 09:29 PM |
| Shredit - Categories on header? | b4ifuru18 | Questions and Comments | 2 | 07-22-2009 10:13 PM |
| In 1.0RC5 - Digg like categories in Submit-step2 selection with radio button | arif1999 | Questions and Comments | 1 | 07-02-2009 11:46 AM |
| HELP: Drop Down Categories in Header Tutorial for ver 9.9.5 | arkasun | Questions and Comments | 3 | 10-19-2008 10:39 PM |
| Categories like in Digg | rhythm | Questions and Comments | 7 | 05-26-2007 03:14 PM |