0

I'm trying to use views 3 to create a view that I can place in a block that is based on the url path

For example

example.com/student/ example.com/student/page1 example.com/student/page2 example.com/student/page3

All 4 pages are in the menu along with other pages Students page1 page2 page3

I want to create a view that will display (dynamically) on pages with the following url pattern example.com/student/* I want the view to only return child menu items that have Student as a parent.

I'm working with menu view, but I can not get the contextual filter and relationship to work correctly. Any tips. Or an alternate way to accomplish

0

You can simply use Menu Block module to accomplish this task. If you want to display a block on specific pages just goto the relevant block configuration and under " Show block on specific pages" select "Only on listed pages" define the following

student/*

Now your block will appear only if this URL pattern will match. No matter what you have used to create your block.

  • Right, but then I will have to create a block for every url type. Correct?? One for /student/ another for courses/* etc... and I'll need distinct menus for each group of pages? I would like to be able to do it dynamically based on the sub section of the main menu. – Baybook Nov 21 '13 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.