I'm playing around with FW/1 to decide if I'd like to move our
organization to it from Fusebox. I love the simplicity. I haven't
written more than a few hundred lines of code in the last couple of
years but am realizing how much I miss coding after moving to
management. I'm struggling with something that sounds like it ought
to be pretty simple.
I'm building a site that has global navigation across the top and
sectional navigation down the left side. The global navigation is in
layouts/default.cfm. I want to repeat the same navigation in every
view of a section of the site (i.e. have the same list of links on the
left side of every page in /admin/ section without having to repeat
the code. I know there's an easy way to do so within the framework
and sticking with the elegant simplicity of FW/1 but am struggling to
find the best way to do so.
Should I just create a /navigation/[section].cfm for each subsection
and include that with #view('navigation/admin')#? Should I create a
subnavigation/default.cfm and use a switch to determine which links to
display?
How should I go about this?
Thanks!
Sounds like you want a section-specific layout that adds navigation?
layouts/mysection.cfm:
<cfoutput>
<div id="wrap">
<div id="sidenav>
#view('navigation/admin')#
</div>
<div id="main">
#body#
</div>
</div>
</cfoutput>
layouts/default.cfm:
<cfoutput>
#view('navigation/main')#
#body#
</cfoutput>
Layouts cascade so the section-specific layout is applied, then the
site-wide layout is applied to that.
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies US -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
You can call services() as needed through the api in view templates.
Hey folks!
Thanks!
--
You received this message because you are subscribed to the Google Groups
"framework-one" group.
To post to this group, send email to framew...@googlegroups.com.
To unsubscribe from this group, send email to
framework-on...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/framework-one?hl=en.