Here's something that I use:
<!--- Get the current folder --->
<cfscript>
function getDir() {
        var directory = '';
        var path = gettemplatepath();
        directory = listgetat(path, (listfind(path, "4h", "/") + 1), "/");
        return directory;
}
</cfscript>

<cftry>
<cfinclude template="#cffourhrootpath#/cfincludes/header_#getdir()#.cfm">
<cfcatch>
<cfinclude template="#cffourhrootpath#/cfincludes/header.cfm">
</cfcatch>
</cftry>

In our case, we're discounting the "4h" directory, and then we only
care about the next directory under that.

On 6/13/05, Mark Leder <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I typically use an include file for navigation elements.  However I want to
> be able to show a tree for directories two levels deep.  In this example,
> I'd like to show the menu below for both the "/presentations/" directory and
> the "/presentations/video/" directory.  The example works fine for the
> "/presentations/' directory, but it will not display for the
> "/presentations/video/" directory.  I'd rather not have a separate full tree
> for each subdirectory.
> 
> Are there other approaches to making this work?
> 
> ===============
> 
> <cfinclude template="../cf-inf/udf/url/getHTTPdir.cfm">
> 
> <cfoutput>
> <div id="linkNav">
> <cfswitch expression="#GetHTTPDir()#">
> 
> <cfcase value="/presentations/">
>  <a href="#REQUEST.webroot#/presentations/video/index.cfm?fcs=03">Personal
> Brilliance Online Video</a><br /><br />
>  <a href="#REQUEST.webroot#/contact/index.cfm?r=vdi">Request Video Demo and
> Information Kit</a><br /><br />
>  <a href="#REQUEST.webroot#/presentations/biography/index.cfm">One Sheet
> Biography</a><br /><br />
>  <a href="#REQUEST.webroot#/presentations/testimonials/index.cfm">Client
> Testimonials</a><br /><br />
>  <a href="#REQUEST.webroot#/presentations/index.cfm">Sample
> Introduction</a><br /><br />
>  <a
> href="#REQUEST.webroot#/presentations/requirements/index.cfm">Staging/Backgr
> ound AV Requirements</a><br /><br />
>  <a href="#REQUEST.webroot#/presentations/video/index.cfm?fcs=12">View
> Introduction Short Film</a><br /><br />
>  <a
> href="#REQUEST.webroot#/presentations/photograph/index.cfm">Photograph</a><b
> r /><br />
>  <a href="#REQUEST.webroot#/presentations/articles/index.cfm">Articles for
> your publication</a>
> </cfcase>
> 
> </cfswitch>
> </div>
> </cfoutput>
> 
> =============
> 
> Thanks,
> Mark
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209392
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to