Customizing Navigation Rendering

From ADF Docs
Revision as of 05:17, 18 February 2010 by Rwest (talk | contribs) (Created page with '== Overview == The Navigation element renders nested <ul><li> elements by default. Additionally, each of the open start points receives a class as well as active pages. If the …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

The Navigation element renders nested
  • elements by default. Additionally, each of the open start points receives a class as well as active pages. If the styles or classes are not ideal for your site and you need to tweak the display - this page will help

    navElementService.cfc

    Rendering of the navigation element is controlled by the "getNavHTML()" method located in the navElementService.cfc. However, instead of modifying the applications cfc directly, it is better to override the cfc using the Customizing Application Component for a Site method. Essentially, you need to do the following:

    1. In your sites /_cs_apps/ directory create a folder called "ohsu_nav"
    2. In the /cs_apps/ohsu_nav/ directory - create a folder called "components"
    3. Copy the /ADF/apps/ohsu_nav/components/navElementService.cfc into the /_cs_apps/ohsu_nav/components/ directory
    4. Edit the /_cs_apps/ohsu_nav/components/navElementService.cfc file in your favorite editor
    5. Change the "extends" attribute in the <cfcomponent> tag from "ADF.apps.ohsu_nav.components.App" to "ADF.apps.ohsu_nav.components.navElementService"
    6. Modify the getNavHTML() method
    7. Reset ADF