Help with navigation

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
hal
Posts: 66
Joined: Mon 9. Feb 2004, 22:07

Help with navigation

Post by hal »

1. What I have:

what I currently have is like follows:

I have a {NAV_TABLE_COLUMN} menue on the left side. There are various entries (Categories), all with no sublevels except for one - it has 3 subcategories. Looks like this:
Category 1
Category 2
Category 3
Category 4
If you select Category 2 the menue tree changes to this:

Category 1
Category 2
Subcategory 2.1
Subcategory 2.2
Subcategory 2.3
Category 3
Category 4
This is like {NAV_TABLE_COLUMN} it normally does.

2. What I want:

I want the menue to look like this all time - no matter what is selected.
Category 1
Category 2
Category 3
Category 4
So instead of inserting this block
Subgatecory 2.1
Subgatecory 2.2
Subgatecory 2.3
between category 2 and category 3 i want to display this block at another place (a box to the right of the page).

3. What I tried:

I remember that I did this with the last non-dev release of phpwcms by creating a category structure like this:
Category 1
Category 2
Subcategory 2.1 [Hidden]
Subsubcategory 2.1.1
Subsubcategory 2.1.2
Subsubcategory 2.1.3
Category 3
Category 4
And in the box to the right I put a {NAV_TABLE_COLUMN:Integer} that would just display this block:
Subsubcategory 2.1.1
Subsubcategory 2.1.2
Subsubcategory 2.1.3
But this doesn't seem to work anymore. It displays well at the beginning. But as soon as one of the Subsubcategories from the right menue is selected the left menue does show the full tree again like this:
Category 1
Category 2
Subcategory 2.1
Subsubcategory 2.1.1
Subsubcategory 2.1.2
Subsubcategory 2.1.3
Category 3
Category 4
IT EVEN SHOWS THE HIDDEN STRUCTURE LEVEL.

I already tried all combinations of visible, public, hide and stuff (at least I feel like having tried them all) but can't get the result I want.

Does anyone have an idea to solve this problem or to work around?

Of course I could make static stuff via a number of different templates but I don't want to loose dynamism as the subsubcategories may change or some new may be added - then I would have to rework all templates and thats a pain.

Any help would be greatly appreciated.

Thanks
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi hal,

you can use an other type of navigation to solve this problem.
Levelbased: Take a look:
http://www.phpwcms.de/forum/viewtopic.php?p=52477#52477
It´s only CSS.

If you want it is able to clone the look and feel of the nav_table_column completle.
Look at this, the upper navi are pure CSS: http://www.casa-grundinvest.de/index.php (Site under heavy construction)

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
hal
Posts: 66
Joined: Mon 9. Feb 2004, 22:07

Post by hal »

@fli-flop

Thanks for your reply. i knew that thread already. But as I have the site running already with various tempates I'd rather find another solution for that point instead of rebuilding navigation on the whole page.

If there will not be another way I might reconsider though - but still I'm hoping.

It was so easy with the old version.... :cry: :cry: (but the new one has more advantages of course :wink: )
jon rain
Posts: 39
Joined: Wed 23. Nov 2005, 17:04
Location: wels, austria

Post by jon rain »

hi hal,

maybe you have changed your front.func.inc.php?!

look at this file in ../include/inc_front


search for function:

function nav_table_struct ($struct, $act_cat_id, .....


and have a look at:

Code: Select all

	foreach($struct as $key => $value) {
		//2005-03-28 Oliver Georgi
		//if($struct[$key]["acat_struct"] == $act_cat_id && $key && !$struct[$key]["acat_hidden"]) {
		//show also when hidden level is on selected tree
		if($struct[$key]["acat_struct"] == $act_cat_id && $key && (!$struct[$key]["acat_hidden"] || isset($GLOBALS['LEVEL_KEY'][$key]))) {
			$c++;
		}
	}

this function is called by NAV_TAB_Column and here you can set the showing of the hidden.
See the comment of Oliver


hope it will help you
Post Reply