hi all,

i know, my post title sounds like a naughty question, obviously it's what it sounds!

I want to build a website that can handle hierarchical navigation, i mean for example we have multiples sections that goes to simple products.
It's like we have a general section we go in, then through the visitor choise we show him a related product.

It can be like:
The website purposes somes main sections (Office, Living Room, Kitchen..) I go to Office section -> then we choose the Desk section -> we can have multiples things on Desk (phone, computers, pens..) but i want to choose the Pens solutions -> then the website shows me all Pens products for the Office section.

Some sections can be used in more than one section, for example Desk section can be showed in others parent sections like in Living room....

Problem is also if i go in the Desk section without passing by the parent section, i want to tell: "hey, you haven't choose a parent section! There's a lot to see, so go foward to choose one buddy!" (sumthing like this ;))

I hope i was clear enought?
How can i achieve this, i looked for some modules like relation but there's no node control access in the way you browse the website (i don't think you can trace the user navigation).

Do you have any idea?

Thank you,
Damien.

Comments

damien_dd’s picture

For information, this will be not a ecommerce website.

cfox612’s picture

That hierarchical structure is built into the Drupal menu system. Most themes only style for 3 levels, but you could add additional menus on secondary/tertiary pages to get the depth.

damien_dd’s picture

Hi Cfox,

This hierarchical structure in Drupal is already ok, the black point is if i want my user to go thought every level, and if not, they have to go up in order to view deeper, like a hopper they have to view and select nodes in a particular step (see description above).

cfox612’s picture

What are your settings on the menu? Do you have the "Show as expanded" box checked?

damien_dd’s picture

I think you missunderstood the needs.

I already know how to leveled navigation. The problem is a bit different.

I got diffrent level of content, and i want users to pass obligatory by all step in the right order, i don't want he goes to the second level without passing by the first one.

I made a little draw in order to be more clear (mastering the art of paint). It shows the step in order, the user must pass by 1-2 and 3 (all nodes), then we shows him a specific selection of nodes.
http://s17.postimg.org/dwxjxb5jz/layered_navigation.jpg

Dk if it's clearer? :)

cfox612’s picture

So you want to force users to access parent pages before children?

Then why the need for the hierarchical menu system in the first place?

damien_dd’s picture

I never mentions the term hierarchical menu ;), i think my english is a bit tendencious.

cfox612’s picture

hierarchical navigation

That was part of your title, so would mean you want your menu structure to look like:

Zero
->One
  ->Two
    ->Three
      ->Four
        ->Five

Do you want the hierarchical dropdown or custom menu's on the secondary/tertiary pages?

damien_dd’s picture

This has nothing to do about menu or dropdown..

"Navigation" as guidance, multi step reading...

cfox612’s picture

Forcing someone through your website "your" way is never a great idea (especially if they are a returning user and know they can type in office/desk/pens to get to their desired location or use a bookmark).

Essentially what you're doing is just creating custom pages with links on them, but you want to pass through some sort of query string variable that each page will have to detect if it's there, otherwise boot the user back to the appropriate page with a variable calling a div to display whatever message you want telling the user why they cannot simply type in the URL to a page they've visited previously.

Sounds like you'd need a custom module, or at the very least some custom code.

dman’s picture

That's a terrible terrible picture and does not help :-P

If your final content is stored in nodes, and thus has an URL, and therefore can be searched for, bookmarked or linked to, then each of those methods bypasses your outcome, and trying to force that not to happen (though I can imagine how it's possible by checking the referer) would break the web somewhat.

However, it could be that you are actually trying to build a wizard-like series of choices (maybe form-based not node-based) and what you are looking for is some sort of custom multistep form to assist people with making the correct final selection based on previous steps.
That could be appropriate for an education course (like an online tutorial)

That could be described as a linear flow, with branching logic. "Heirarchical navigation" however usually implies that all options are available for browsing at the same time.

Still I don't feel that you've described what you are *actually* doing fully, and if you can't explain that, we are left guessing randomly at what you really are thinking.
What is your business reason for not wanting someone to find their way directly to your 'pens' page from Google? Is it because the story you told is not what you actually are building?

damien_dd’s picture

Ahah, i'm really sorry about my artistic talent and my poor explanation of my needs, but i think you have it: linear flow. thank you, i think that's what i was searching.

>> What is your business reason for not wanting someone to find their way directly to your 'pens' page from Google? Is it because the story you told is not what you actually are building?
It's only because we want to filter slowly to the offered solutions. There will be not a listing page of final solutions, the only way to access it will be with this linear flow. This application will be more dedicated to commercial people and not directly customers.

dman’s picture

If your criteria or questions are dynamic (Questionnaire or wizard-like) then you could get webform (with multistep) to do some really powerful stuff. I'm not sure that it would feed well into having MANY choices at the final step though. Depends on how well you can encode your logic.

However
If you can map out your desired flow well enough with static links or simple choices (eg Is your business small, medium or large?) then what you could build is a directed graph to form your linear path a bit like a choose-your-own-adventure book.
Hypertext links alone would be sufficient for that, though if I was building this graph with more than 2 dozen nodes, or for future expansion, I'd probably start using entityreference to manage my links.
That is simply - no generic contextual navigation at all. Just a page with links in the content that links to another page with links.

I still question how *bad* it would be for someone to find their way to the final pages (eg though direct outside links) without going through your funnel.

If this is an important business issue, then a small custom module that could make the internal nodes 'private' would be enough. I would simply check if the visitor came from a referrer on the same host, and if you can be sure that only 'proper' incoming links are present on your pages - then this layer would be enough to prevent most mis-use. It can be trivially cracked, but only if someone really wants to. An 'anti-leech' script could be adapted for that.

If it's not a real business problem, then just create your pages, and only link to the later pages you want to, and there is pretty much nobody will find their way to the end prematurely ... unless they use Google.

damien_dd’s picture

Thank you both, i'll try to mix entityreference with somes internal rules.

nwehner’s picture

Did you end up finding a good way to accomplish this?

I'm trying to get a similar setup, where users progress through an "active learning" module, selecting from different scenarios/gaining and spending points along the way.

Thanks for any insights!
-Nick

damien_dd’s picture

Hi Nick,

Unfortunatly, this project has not been done yet and mute for a while, so i did not pushed foward to made it. However, regarding now, maybe i'll be using statics nodes and record progression through session variables.
I've seen this project but did not used it https://drupal.org/project/rules_session_vars

If you have more informatin, i'm really interested to it.
Hope it helps you,
Damien.