Monday, 22 July 2013

Drupal7 - Dynamically add Content Title as a menu link which is getting posted under a selected Content Type.

STEP1: Setup Parent Menu Item
1) Login to Admin Panel
2) Go to Structure -> Menus -> Main Menu (admin/structure/menu/manage/main-menu) - [Note: As i am using Main Menu as my Header Navigation Menu, i have selected it. If you are using any other menu, please select the corresponding one]
3) Click on "Add link"
4) Add your Parent menu Item Title and corresponding Link Path and click on "Save" button

STEP2: Setup Content Type and Enable Provide as a Default menu Link option by default.
1) Download "default_menu_link" module from site (
2) Place the downloaded "default_menu_link" module in "sites/all/modules/" folder.
3) Go to Modules Page in Administration Panel (admin/modules)
4) Enable "Default Menu Item" Module and click on "Save Configuration" Button.
5) Go to Structure -> Content Types -> Add Content Type (admin/structure/types/add)
6) Add Preferred Content Type Name, Description & Other Settings
7) Check 'Default the "Provide a menu link" item to checked.' option under "Menu Settings" tab under Content Type Add / Edit Page
8) Select "Default parent item" also (It is to specify where do we want to display the child items - Under which menu item)
7) Select Parent Menu Item from "Menu Location" Select box under "Taxonomy Menu" Fieldset
8) Click on Save Button

9) Now add content under newly created content type.

Now go to Home Page and See Dynamic Menu Item Visibility.

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.