Re: Farcry 6.08 with FarcryCMS plugin
chris <[email protected]> Tue, 28 Dec 2010 01:52:42 -0800 (PST)
| Newsgroups | gmane.comp.cms.farcry.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Jeff, Thanks for the suggestion, but i thought of different approach, that seems more efficient because you don't have to call the tree function (Query) twice, and it works now because of the webskin tag import in the cfsavecontent variable. <!--- The file include_leftMenu.cfm ---> <cfsavecontent variable=3D"leftMenuOutput"> <cfimport taglib=3D"/farcry/core/tags/webskin" prefix=3D"skin"> <cfoutput> <skin:genericNav navID=3D"#request.navid#" functionMethod=3D"getBloodline" functionArgs=3D"jointable=3D""dmNavigation"", status=3D""#request.mode.lvalidstatus#""" id=3D"nav-secondary" startlevel=3D"3" bActive=3D"true"> </cfoutput> </cfsavecontent> <!--- ----> <!--- The file DisplayPageStandard ----> <cfinclude template=3D"farcry/projects/#application.applicationname#/ webskin/includes/include_leftMenu.cfm"> <cfif len(leftMenuOutput) gt 0> <div id=3D"leftNavContainer"> #LeftmenuOutput# </div> <cfelse> <!--- different Layout ---> </cfif> On Dec 28, 4:24=A0am, Jeff Coughlin <[email protected]> wrote: > Chris, > > I'm not sure it's ideal, but you could do a getDescendants() and see if i= t returns any records before deciding to output the div for your subnav . > > Example: (note: If you're trying to build the subnav from a specific leve= l, keep that in mind in case you need to use a different objectId instead o= f the current page navId) > <cfscript> > =A0 aNavfilter =3D ["status IN (#listQualify(request.mode.lValidstatus, "= '")#)"]; > =A0 qSubNav =3D application.factory.oTree.getDescendants(objectId=3Dreque= st.navId, depth=3D1, aFilter=3DaNavFilter, bHideEmptyNodes=3Dtrue); > </cfscript> > > <cfif qSubNav.recordCount gt 0> > =A0 <div id=3D"leftmenuNavigation"> > =A0 =A0 <skin:genericNav foo=3Dbar /> > =A0 </div> > </cfif> > > -- > Jeff Coughlin > Web Application Developerhttp://jeffcoughlin.com > > On Dec 27, 2010, at 3:06 PM, chris wrote: > > > > > That would be great if a subnavigation on the left is not needed, but > > in my case i have one. > > Speaking about the navigation. in some cases the submenu doesnt show > > because there are no children. > > only in my case i use a div around the subnavigation. But i dont want > > the div in the lay-out if there are no children. what is the best way > > to hide the div. For de subnavigation i use: > > > <div id=3D"leftmenuNavigation"> > > =A0 =A0 =A0<skin:genericNav foo=3Dbar> > > </div> > > > I thought i could make an includes directory in de webskin folder of > > my project and than put a file in it with the code > > <cfsavecontent variable=3D"leftMenu"> > > =A0 <cfoutput> > > =A0 =A0 =A0 <skin:genericNav foo=3Dbar> > > =A0</cfoutput> > > </cfsavecontent> > > > And then in the displayPageStandard: > > > <include template=3D"/farcry/projects/[applicationname]/webskins/ > > includes/include_leftmenu.cfm"> > > <cfif len(leftMenu) gt 0> > > =A0<div id=3D"leftmenuNavigation"> > > =A0 =A0 =A0#leftMenu# > > </div> > > </cfif> > > But that doesnt give any output and isnt very clean either. is there a > > better way? > > > Thank you so much for the support ones again. > > > Chris van der Poel (The Netherlands) > > > On 27 dec, 17:14, Sean Coyne <[email protected]> wrote: > >> In addition to AJ's response, ideally in your displayPageStandard webs= kins > >> you will only have the design code relative the target content types. = =A0The > >> generic design aspects should be in displayHeaderStandard and > >> displayFooterStandard webskins that can be shared by all content types= . > > > -- > > You received this message because you are subscribed to the Google Grou= ps "farcry-user" group. > > To post to this group, send email to farcry-user-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > > To unsubscribe from this group, send email to farcry-user+unsubscribe@g= ooglegroups.com. > > For more options, visit this group athttp://groups.google.com/group/far= cry-user?hl=3Den.- Hide quoted text - > > - Show quoted text - --=20 You received this message because you are subscribed to the Google Groups "= farcry-user" group. To post to this group, send email to farcry-user-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To unsubscribe from this group, send email to farcry-user+unsubscribe@googl= egroups.com. For more options, visit this group at http://groups.google.com/group/farcry= -user?hl=3Den.