So- you have a view created, and you have a block or page display for the view. But now you want to add a few custom links, and you *don't* want to hard code them. Why do you want Drupal to handle them? Some advantages are that Drupal can recognize when a link is 'active' and add the proper CSS for the link; and it can also recognize if Drupal is installed in a sub directory and have a base_url in your settings.php and it will render the links properly.
This how-to assumes you have the view already created and that you have the custom menu. Visit your admin/build/menu/add and admin/build/views/add if you need to catch up.
- Enable PHP filtering.
- The text field for header or footer allows filtered HTML and full HTML by default, but you must enable PHP input filtering to allow code in a view. In Drupal 6, this is disabled by default. Find it under admin/build/modules listed under 'core'. Tick [x] PHP filter, and scroll down to save configuration.
- Edit your view, admin/build/view...
- Look in the 2nd column Under "Basic Settings" click - Footer: None
- Scroll down to the text field below "Defaults: Footer", and paste in this code:
<?php print theme('menu_tree', menu_tree('menu-name')); ?>
- Where is says 'menu-name' - change name to your menu name. For example 'menu-addimage', where addimage was the name of the menu.
- Note: When you made the custom menu, Drupal appended "menu-" to the name, so look at the path in the admin/build/menu area to double check the name.
- Under, click Input format, select "PHP code".
- Click update.
- Then save. You should see your menu now.
FYI: API reference in case someone is searching: http://api.drupal.org/api/function/menu_tree/6