User Tools

Site Tools


phplugins_drop-menu_navigation

Drop-down Navigation Menus in CE3

The CE3 plugins support drop-down style menus for site navigation. To implement drop-down menus, you will need to enable PHPlugins and do some basic-level HTML coding.

This process is fairly simple, though, because we've already given you all of the necessary code. You just need to activate that code, then edit it to set your links.

1. Enable PHPlugins in Lightroom

See the Enable PHPlugins section of documentation.

2. Setup drop-down navigation in Lightroom

In the Site Info control pane, under Navigation Container, set Navigation Type: Multi-level.

Use the UI to make whatever visual customizations you wish. The second menu item – “Galleries” by default – will always have a sample drop-down menu so that you can preview your changes.

3. Export and Upload, or Publish

As usual, export-and-upload your gallery or pages; or if using TTG CE3 Publisher, then upload your template and publish something.

4. Activate the drop-menu function in the phplugins.php file

Now, to implement and customize your drop-down menu, you will need to open the /phplugins/phplugins.php file in a text-editor. Within the file, we have prepare two sample functions which are disabled by default.

The first begins:

/* DELETE THIS LINE
// SITE-WIDE "DROP-DOWN" NAVIGATION MENU
// This function establishes a site-wide navigation menu using pseudo-absolute URLs -- portable, domain agnostic, and without the location limitations of relative URLs
// Serves as an example of a function being applied globally

This is a standard, fully manual drop-down menu.


The second begins:

/* DELETE THIS LINE
// SITE-WIDE "DROP-DOWN" NAVIGATION MENU w/ AUTO INDEX GALLERY LIST
// This function establishes a site-wide navigation menu using pseudo-absolute URLs -- portable, domain agnostic, and without the location limitations of relative URLs
// Serves as an example of a function being applied globally
// Utilizes the auto index script to list galleries in a specified location as a drop-menu

This menu is similar to the first, but includes script which creates an auto-indexed drop-down menu of image galleries at a specific location. For example, the drop-menu can list all image galleries in your /galleries/ folder.


Whichever function you choose, the act of activating that function is the same. Delete the lines:

/* DELETE THIS LINE

… and …

DELETE THIS LINE */

… which surround the function. Save the file, then visit one of your pages. You should be able to observe that the default menu has been replaced by the menu here defined by PHPlugins.

5. Customize your menu

With the drop-menu functions verified to be active, you may now customize the menu. Add, edit or remove navigation items by editing the HTML source code in the function. Use the samples as a basis for your work, and adhere to the syntax as closely as possible to avoid error.

If you make mistakes, remember that Undo is your friend.

phplugins_drop-menu_navigation.txt · Last modified: 2013/03/06 07:18 by admin