Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Show only subcategories when clicking a category

 
Reply to topic    Forum Index » Help View previous topic
View next topic
Show only subcategories when clicking a category
Author Message
yello



Joined: 08 Nov 2005
Posts: 27

Post Show only subcategories when clicking a category Reply with quote
When entering a category as a simple visitor, i need cutenews to show only the subcategories of this category and not the whole tree. Then, when user clicks to a subcategory, he could see the subcategory contents. How can i do that? It is important for me. Thank you in advance. I am using the mysql version of your latest cutenewssql.


Last edited by yello on Mon Feb 13, 2006 3:52 pm; edited 1 time in total
Sun Feb 05, 2006 10:38 pm View user's profile Send private message
Guest








Please login to hide the ads.

yello



Joined: 08 Nov 2005
Posts: 27

Post Reply with quote
Is there any solution to this?



Otherwise, it would be useful for me this: When someone clicks on a category, then he sees only the subcategories of the specific category he clicked on. Main categories could still be displayed. Anyone? It is really confusing when the whole tree is being displayed everywhere!
Mon Feb 13, 2006 3:47 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Quote:
It is really confusing when the whole tree is being displayed everywhere!


Well, the tree should only display when using cn_category();



To limit the categories being displayed you can use something like this:

echo cn_category('&nbsp;', '<a href="[php]cute_get_link($row, category)[/php]">{name} ([php]count_category_entry({id})[/php])</a><br />', true, 0);



(0 is the default value and shows the whole tree. Change it to 1 or 2 or...)
Mon Feb 13, 2006 4:52 pm View user's profile Send private message
yello



Joined: 08 Nov 2005
Posts: 27

Post Reply with quote
Yes but in this way (by changing the level from 0 to 1), if i enter a subcategory, all the subcategories of all categories will be shown. Am i right? I want the subcategories of the specific category to be shown. Could i do this?
Mon Feb 13, 2006 5:06 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
I don't completely understand what you are trying to do. Anyway, that's how cn_category(); is working:



Level 0 shows this:

Cat

-Subcat

--Subsubcat

Cat2

-Subcat2



Clicking on Subcat shows all articles from Subcat and its child categories.



Level 1 shows this:

Subcat

-Subsubcat

Subcat2



Clicking on Subcat shows all articles from Subcat and its child categories.
Mon Feb 13, 2006 6:04 pm View user's profile Send private message
yello



Joined: 08 Nov 2005
Posts: 27

Post Reply with quote
I want this:



First page menu must not show subcategories at all even if there are subcategories:



Category 01

Category 02

Category 03



Then, if a visitor clicks on Category 01, he should see this:



Category 01

- Subcategory 01

- Subcategory 02

Category 02

Category 03



When he clicks on Category 02, he should see this:



Category 01

Category 02

- Subcategory 01

- Subcategory 02

Category 03



And when he clicks on Category 03, he should see this:



Category 01

Category 02

Category 03

- Subcategory 01

- Subcategory 02



I want the subcategories of a specific category to be shown only when a user enters this specific parent category.
Mon Feb 13, 2006 8:20 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Now I got it. Wink



We had this question before:

http://english.cutenews.ru/forum/viewtopic.php?p=1734#1734
Mon Feb 13, 2006 8:32 pm View user's profile Send private message
yello



Joined: 08 Nov 2005
Posts: 27

Post Reply with quote
I have read it but i think it is very complicated to use css/javascript (there will be also compatibility/accessibility problems) for this and quite useless to use static links.



Any other solution based on php code?
Mon Feb 13, 2006 8:57 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.