Newbie Question

Using CB3 and I am building my handlers and want to create my
navigation using the event.buildLink, but how do I set the links
"name" that the user would click on.

In the default app document it is used like this:
<cfloop list="#getSetting("RegisteredHandlers")#" index="handler">
<li><a href="#event.buildLink(handler)#">#handler#</a></li>
</cfloop>

What would replace #handler# with so it would display "Contact Us" and
how would you set that value in the handler?

Don’t do it dynamically. Looping like that makes sense for that initial start page but, generally speaking, is not something you’d do yourself. You can just make a link yourself like:

<a href="#event.buildlink(“handler.contactus”)#">contact us

  • Gabriel

So what is 'best practice' in referencing assets (images, pdf's,
flash, etc.)?

Hmm. Best might be relative but some options are:

  1. Just include it in your page
  2. Decorate your request context to add them however you like (example 1 in the link)
  3. Use the coldbox HTML object to add them (example 2 in the link)

http://aarongreenlee.com/share/coldbox-resource-asset-management

  • Gabriel