Difference between revisions of "Customizing Navigation Rendering"

From ADF Docs
Jump to: navigation, search
(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 …')
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
== Overview ==
 
== 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 styles or classes are not ideal for your site and you need to tweak the display - this page will help
+
The Navigation element renders nested &lt;ul&gt;&lt;li&gt; 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 ==
 
== navElementService.cfc ==
Line 13: Line 13:
 
# [[Reset "Site" ADF | Reset ADF]]
 
# [[Reset "Site" ADF | Reset ADF]]
  
[[Category: Navigation]]
+
[[Category: OHSU Navigation]]

Latest revision as of 04:36, 20 April 2010

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 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