| home | resources |
search |
news | join | members: 6958 |
drupal | Fri, 2008-05-23 05:20 tags: Developer Zone, Drupal I wanted to create a dynamic menu and store it in a variable like the default $primary_links or $secondary_links. This is so that the site administrator could update and create links for the footer without having to do HTML. Step one was go login as the administrator and go to menus->add menu. Create a new menu. Following the instructions under the textfield create a menu called "footer". Title the menu with "Footer links" so it is easy to find. The system automatically adds a prefix to the menu name so the name in the database will be menu-footer. Now that I have a menu and know its name I only had to find the right Drupal function and use the following code,
<?phpThe above code was okay but it uses the default formatting. I wanted to do something slightly different. This not the exact code but something to give you an idea of how to do things in a more custom fashion.
I added this to the bottom of page.tpl.php. I only had one last step and that was to start creating some links for the menu. I went to the menus area and saw a new link called "Footer links". Clicking on this brought a form for adding links and I could see the parent would be set as "<Footer links>". I added a few more links and I was done. The next thing I did was to add a page and use the menu settings in the form to add a link to the footer. Happy publishing! Thoughtbox - So what did you think? |
Web Developers London Hotels
Silverlight Laptop Reviews
Content Management Systems Just Dial International Calls
Windows Excel Training Courses
Adobe Flex Silverlight excel courses in london
eRuby Data Recovery
Adobe Flex
|
NewsletterGet updates on Hiveminds services, articles and downloads by signing up for the newsletter. |
Editor's choiceSome of the better articles, stories and tutorials found at Hiveminds. |
Find moreFind more of Hiveminds articles, stories, tutorials and user comments by searching. |
Picked linksHand picked websites and articles from around the web that provide quality reading. |