Navigation Hierarchy issue

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
chintansoni
Forum Members
Forum Members
Posts: 19
Joined: Sun Oct 29, 2006 8:00 pm

Navigation Hierarchy issue

Post by chintansoni »

Hi there,
I have some issues with Navigation Hierarchy, pelase help me to solve this…

I have a website where I have put the $config['use_hierarchy'] = false;  under #URL Settings Almost for all menu items I wanted this way only URL hierarchy off, but for 1-2 items under the main menu I want url hierarchy to be enabled.... So I am not able to figure it out…

In short for some of the menu items I want to $config['use_hierarchy'] = true and for some $config['use_hierarchy'] = false;  (default will be false)


Can anyone please help me?

It will really really helpful for me…
Thanks
chintansoni
Forum Members
Forum Members
Posts: 19
Joined: Sun Oct 29, 2006 8:00 pm

Re: Navigation Hierarchy issue

Post by chintansoni »

come on, somebody out there must have a clue  Huh
Pierre M.

Re: Navigation Hierarchy issue

Post by Pierre M. »

Hello,
chintansoni wrote: under #URL Settings Almost for all menu items I wanted this way only URL hierarchy off, but for 1-2 items under the main menu I want url hierarchy to be enabled....
$config['use_hierarchy'] is a site wide setting. It is either true or false. It can't be "almost off".

Pierre M.
chintansoni
Forum Members
Forum Members
Posts: 19
Joined: Sun Oct 29, 2006 8:00 pm

Re: Navigation Hierarchy issue

Post by chintansoni »

So what is the solution to this?

Is there any other module available which i can use? please give me some solution to this.. i'll be really helpful to you.... thank you,
Pierre M.

Re: Navigation Hierarchy issue

Post by Pierre M. »

Don't you want an almost flat hierarchy ? Do so, except where you want a strong/deep tree. Hence $config['use_hierarchy']=true.
BTW, see the parameters of the {menu ...} tag.

Pierre M.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Navigation Hierarchy issue

Post by Dr.CSS »

It would be nice to know the logic behind this request...

Are you saying you want some pages to show parent/child/child and others, even if they are child page, to show /child  ?...

Or are you doing the 'sometimes' for modules to have Pretty URLs...
Last edited by Anonymous on Tue May 13, 2008 8:09 pm, edited 1 time in total.
chintansoni
Forum Members
Forum Members
Posts: 19
Joined: Sun Oct 29, 2006 8:00 pm

Re: Navigation Hierarchy issue

Post by chintansoni »

I'll tell you... why i need this....

I have a website where I have ALREADY added ~50 pages with $config['use_hierarchy'] = false;

Pages are added Under "home".... so it is like

Home (/)
>Page 1 (/page1.html)
>Page 2 (/page2.html)
>Page 3 (/page3.html)
>Page 4 (/page4.html)
>Page 5 (/page5.html)
>Page 6 (/page6.html)
>Page 7 (/page7.html)

Now I want to add 1 more item under main menu, called "Articles", so for this item i want to use URL hierarchy like...

Articles (/articles.html)
>Page 1 (/articles/page1.html)
>Page 2 (/articles/page2.html)
>Page 3 (/articles/page3.html)
>Page 4 (/articles/page4.html)
>Page 5 (/articles/page5.html)
>Page 6 (/articles/page6.html)
>Page 7 (/articles/page7.html)


And the thing is that i can not change  $config['use_hierarchy'] = false; to TRUE is ....
that now my pages are indexed in search engines, if i'll set  $config['use_hierarchy'] = false; to TRUE all previous URL also will get change, and i'll loose traffic coming from search engine...if i'll change...

let me know if you did not understand my requirement

please help me if you can....
thank you
Pierre M.

Re: Navigation Hierarchy issue

Post by Pierre M. »

chintansoni wrote: ...And the thing is that i can not change  $config['use_hierarchy'] = false; to TRUE is ....
that now my pages are indexed in search engines, if i'll set  $config['use_hierarchy'] = false; to TRUE all previous URL also will get change, and i'll loose traffic coming from search engine...if i'll change...
There is a "moved pages" modules or some things like this. Search for 301 in the forge.
I suggest you enable the hierarchy to make the hierarchy you want and you put some .htaccess 301 rules to let bots know some of your pages have moved : Redirect permanent /pageN.html -> /articles/pageN.html firstly.

Pierre M.
lancemuz
New Member
New Member
Posts: 2
Joined: Wed Jul 11, 2007 12:57 am

Re: Navigation Hierarchy issue

Post by lancemuz »

You can selectively decide which sections have the hierarchy applied by editing /lib/classes/class.content.inc.php

Look around line 1288 for

Code: Select all

if (($config['use_hierarchy'] == true)
Change to:

Code: Select all

if (($config['use_hierarchy'] == true) && (!$this->HierarchyPath() == "news"))
On my site I only wanted the news module to display a hierarchy. You could easily change that to "Articles" or build a more complex logic statement to include additional sections.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Navigation Hierarchy issue

Post by Dr.CSS »

I believe that even if you change the config to true or false any URL that is indexed in search engine will still get to your site, try to get to the page by removing the hierarchy levels out of it and you will still get to the page, a page is a page no matter if it has this set or not, as a matter of fact someone complained once because you could do this, they didn't want you to be able to get to the page w/o the long url made by the hierarchy switch...
Post Reply

Return to “CMSMS Core”