| Author |
Message |
yello
Joined: 08 Nov 2005 Posts: 27
|
|
Show only subcategories when clicking a category |
|
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 |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
yello
Joined: 08 Nov 2005 Posts: 27
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
 |  | 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(' ', '<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 |
|
 |
yello
Joined: 08 Nov 2005 Posts: 27
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
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 |
|
 |
yello
Joined: 08 Nov 2005 Posts: 27
|
|
|
|
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 |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
| Mon Feb 13, 2006 8:32 pm |
|
 |
yello
Joined: 08 Nov 2005 Posts: 27
|
|
|
|
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 |
|
 |
|