Re: Re: Farcry 6.08 with FarcryCMS plugin
Jeff Coughlin <[email protected]> Tue, 28 Dec 2010 05:46:49 -0500
| Newsgroups | gmane.comp.cms.farcry.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-265--454086970 Content-Type: text/plain; charset=ISO-8859-1 Same concept. I noted it wasn't ideal (because of the extra query call). There are even better ways to do it (depending on your full layouts), but what you have should work fine for your needs. Glad you got it working. Regards, -- Jeff Coughlin Web Application Developer http://jeffcoughlin.com On Dec 28, 2010, at 4:52 AM, chris wrote: > 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="leftMenuOutput"> > <cfimport taglib="/farcry/core/tags/webskin" prefix="skin"> > <cfoutput> > <skin:genericNav navID="#request.navid#" > functionMethod="getBloodline" > functionArgs="jointable=""dmNavigation"", > status=""#request.mode.lvalidstatus#""" id="nav-secondary" > startlevel="3" bActive="true"> > </cfoutput> > </cfsavecontent> > <!--- ----> > > <!--- The file DisplayPageStandard ----> > <cfinclude template="farcry/projects/#application.applicationname#/ > webskin/includes/include_leftMenu.cfm"> > <cfif len(leftMenuOutput) gt 0> > <div id="leftNavContainer"> > #LeftmenuOutput# > </div> > <cfelse> > <!--- different Layout ---> > </cfif> > > > > On Dec 28, 4:24 am, Jeff Coughlin <[email protected]> wrote: >> Chris, >> >> I'm not sure it's ideal, but you could do a getDescendants() and see if it 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 level, keep that in mind in case you need to use a different objectId instead of the current page navId) >> <cfscript> >> aNavfilter = ["status IN (#listQualify(request.mode.lValidstatus, "'")#)"]; >> qSubNav = application.factory.oTree.getDescendants(objectId=request.navId, depth=1, aFilter=aNavFilter, bHideEmptyNodes=true); >> </cfscript> >> >> <cfif qSubNav.recordCount gt 0> >> <div id="leftmenuNavigation"> >> <skin:genericNav foo=bar /> >> </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="leftmenuNavigation"> >>> <skin:genericNav foo=bar> >>> </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="leftMenu"> >>> <cfoutput> >>> <skin:genericNav foo=bar> >>> </cfoutput> >>> </cfsavecontent> >> >>> And then in the displayPageStandard: >> >>> <include template="/farcry/projects/[applicationname]/webskins/ >>> includes/include_leftmenu.cfm"> >>> <cfif len(leftMenu) gt 0> >>> <div id="leftmenuNavigation"> >>> #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 webskins >>>> you will only have the design code relative the target content types. The >>>> 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 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-/JYPxA39Uh5TLH3MbocFF+G/[email protected] >>> For more options, visit this group athttp://groups.google.com/group/farcry-user?hl=en.- Hide quoted text - >> >> - Show quoted text - > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/[email protected] > For more options, visit this group at http://groups.google.com/group/farcry-user?hl=en. > -- 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-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit this group at http://groups.google.com/group/farcry-user?hl=en. --Apple-Mail-265--454086970 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 <html><head></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode:= space; -webkit-line-break: after-white-space; ">Same concept. I note= d it wasn't ideal (because of the extra query call). There are even b= etter ways to do it (depending on your full layouts), but what you have sho= uld work fine for your needs. Glad you got it working.<div><br></div>= <div>Regards,</div><div><br><div> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; color:= rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal;= font-variant: normal; font-weight: normal; letter-spacing: normal; line-he= ight: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transfor= m: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-= horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text= -decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-= stroke-width: 0; "><span class=3D"Apple-style-span" style=3D"border-collaps= e: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; = font-style: normal; font-variant: normal; font-weight: normal; letter-spaci= ng: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transfo= rm: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border= -horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-tex= t-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text= -stroke-width: 0px; "><div style=3D"word-wrap: break-word; -webkit-nbsp-mod= e: space; -webkit-line-break: after-white-space; "><span class=3D"Apple-sty= le-span" style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-fami= ly: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; f= ont-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2= ; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; w= ord-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-ve= rtical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text= -size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wr= ap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-s= pace; "><span class=3D"Apple-style-span" style=3D"border-collapse: separate= ; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style:= normal; font-variant: normal; font-weight: normal; letter-spacing: normal;= line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; w= hite-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal= -spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decoratio= ns-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-wid= th: 0px; "><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; -= webkit-line-break: after-white-space; "><div><div>--</div><div>Jeff Coughli= n</div><div>Web Application Developer</div><div><a href=3D"http://jeffcough= lin.com">http://jeffcoughlin.com</a></div></div></div></span></div></span><= /div></span></span> </div> <br><div><div>On Dec 28, 2010, at 4:52 AM, chris wrote:</div><br class=3D"A= pple-interchange-newline"><blockquote type=3D"cite"><div>Hi Jeff,<br><br>Th= anks for the suggestion, but i thought of different approach, that<br>seems= more efficient because you don't have to call the tree function<br>(Query)= twice, and it works now because of the webskin tag import in<br>the cfsave= content variable.<br><br><!--- The file include_leftMenu.cfm ---><br>= <cfsavecontent variable=3D"leftMenuOutput"><br> <cfimport taglib= =3D"/farcry/core/tags/webskin" prefix=3D"skin"><br> <cfoutput><br>= <skin:genericNav navID=3D"#request.navid#"<br>functionMethod=3D"g= etBloodline"<br>functionArgs=3D"jointable=3D""dmNavigation"",<br>status=3D"= "#request.mode.lvalidstatus#""" id=3D"nav-secondary"<br>startlevel=3D"3" bA= ctive=3D"true"><br> </cfoutput><br></cfsavecontent><br><!= --- ----><br><br><!--- The file DisplayPageStandard ----><br><c= finclude template=3D"farcry/projects/#application.applicationname#/<br>webs= kin/includes/include_leftMenu.cfm"><br><cfif len(leftMenuOutput) gt 0= ><br> <div id=3D"leftNavContainer"><br> #LeftmenuOutput#<br>= </div><br><cfelse><br> <!--- different Layout ---><br>&l= t;/cfif><br><br><br><br>On Dec 28, 4:24 am, Jeff Coughlin <j...@= jeffcoughlin.com> wrote:<br><blockquote type=3D"cite">Chris,<br></blockq= uote><blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite">I= 'm not sure it's ideal, but you could do a getDescendants() and see if it r= eturns any records before deciding to output the div for your subnav .<br><= /blockquote><blockquote type=3D"cite"><br></blockquote><blockquote type=3D"= cite">Example: (note: If you're trying to build the subnav from a specific = level, keep that in mind in case you need to use a different objectId inste= ad of the current page navId)<br></blockquote><blockquote type=3D"cite"><= ;cfscript><br></blockquote><blockquote type=3D"cite"> aNavfilter = =3D ["status IN (#listQualify(request.mode.lValidstatus, "'")#)"];<br></blo= ckquote><blockquote type=3D"cite"> qSubNav =3D application.factory.oT= ree.getDescendants(objectId=3Drequest.navId, depth=3D1, aFilter=3DaNavFilte= r, bHideEmptyNodes=3Dtrue);<br></blockquote><blockquote type=3D"cite"></= cfscript><br></blockquote><blockquote type=3D"cite"><br></blockquote><bl= ockquote type=3D"cite"><cfif qSubNav.recordCount gt 0><br></blockquot= e><blockquote type=3D"cite"> <div id=3D"leftmenuNavigation"><br= ></blockquote><blockquote type=3D"cite"> <skin:genericNav f= oo=3Dbar /><br></blockquote><blockquote type=3D"cite"> </div>= ;<br></blockquote><blockquote type=3D"cite"></cfif><br></blockquote><= blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite">--<br><= /blockquote><blockquote type=3D"cite">Jeff Coughlin<br></blockquote><blockq= uote type=3D"cite">Web Application <a href=3D"Developerhttp://jeffcoughlin.= com">Developerhttp://jeffcoughlin.com</a><br></blockquote><blockquote type= =3D"cite"><br></blockquote><blockquote type=3D"cite">On Dec 27, 2010, at 3:= 06 PM, chris wrote:<br></blockquote><blockquote type=3D"cite"><br></blockqu= ote><blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite"><b= r></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite">That wou= ld be great if a subnavigation on the left is not needed, but<br></blockquo= te></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite">in my c= ase i have one.<br></blockquote></blockquote><blockquote type=3D"cite"><blo= ckquote type=3D"cite">Speaking about the navigation. in some cases the subm= enu doesnt show<br></blockquote></blockquote><blockquote type=3D"cite"><blo= ckquote type=3D"cite">because there are no children.<br></blockquote></bloc= kquote><blockquote type=3D"cite"><blockquote type=3D"cite">only in my case = i use a div around the subnavigation. But i dont want<br></blockquote></blo= ckquote><blockquote type=3D"cite"><blockquote type=3D"cite">the div in the = lay-out if there are no children. what is the best way<br></blockquote></bl= ockquote><blockquote type=3D"cite"><blockquote type=3D"cite">to hide the di= v. For de subnavigation i use:<br></blockquote></blockquote><blockquote typ= e=3D"cite"><br></blockquote><blockquote type=3D"cite"><blockquote type=3D"c= ite"><div id=3D"leftmenuNavigation"><br></blockquote></blockquote><bl= ockquote type=3D"cite"><blockquote type=3D"cite"> <sk= in:genericNav foo=3Dbar><br></blockquote></blockquote><blockquote type= =3D"cite"><blockquote type=3D"cite"></div><br></blockquote></blockquo= te><blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite"><bl= ockquote type=3D"cite">I thought i could make an includes directory in de w= ebskin folder of<br></blockquote></blockquote><blockquote type=3D"cite"><bl= ockquote type=3D"cite">my project and than put a file in it with the code<b= r></blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"c= ite"><cfsavecontent variable=3D"leftMenu"><br></blockquote></blockquo= te><blockquote type=3D"cite"><blockquote type=3D"cite"> <cfoutput&= gt;<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote type= =3D"cite"> <skin:genericNav foo=3Dbar><br></block= quote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite">&nbs= p;</cfoutput><br></blockquote></blockquote><blockquote type=3D"cite">= <blockquote type=3D"cite"></cfsavecontent><br></blockquote></blockquo= te><blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite"><bl= ockquote type=3D"cite">And then in the displayPageStandard:<br></blockquote= ></blockquote><blockquote type=3D"cite"><br></blockquote><blockquote type= =3D"cite"><blockquote type=3D"cite"><include template=3D"/farcry/project= s/[applicationname]/webskins/<br></blockquote></blockquote><blockquote type= =3D"cite"><blockquote type=3D"cite">includes/include_leftmenu.cfm"><br><= /blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite= "><cfif len(leftMenu) gt 0><br></blockquote></blockquote><blockquote = type=3D"cite"><blockquote type=3D"cite"> <div id=3D"leftmenuNavigat= ion"><br></blockquote></blockquote><blockquote type=3D"cite"><blockquote= type=3D"cite"> #leftMenu#<br></blockquote></blockquote>= <blockquote type=3D"cite"><blockquote type=3D"cite"></div><br></block= quote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite"><= /cfif><br></blockquote></blockquote><blockquote type=3D"cite"><blockquot= e type=3D"cite">But that doesnt give any output and isnt very clean either.= is there a<br></blockquote></blockquote><blockquote type=3D"cite"><blockqu= ote type=3D"cite">better way?<br></blockquote></blockquote><blockquote type= =3D"cite"><br></blockquote><blockquote type=3D"cite"><blockquote type=3D"ci= te">Thank you so much for the support ones again.<br></blockquote></blockqu= ote><blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite"><b= lockquote type=3D"cite">Chris van der Poel (The Netherlands)<br></blockquot= e></blockquote><blockquote type=3D"cite"><br></blockquote><blockquote type= =3D"cite"><blockquote type=3D"cite">On 27 dec, 17:14, Sean Coyne <coyne.= [email protected]> wrote:<br></blockquote></blockquote><blockquote type=3D"= cite"><blockquote type=3D"cite"><blockquote type=3D"cite">In addition to AJ= 's response, ideally in your displayPageStandard webskins<br></blockquote><= /blockquote></blockquote><blockquote type=3D"cite"><blockquote type=3D"cite= "><blockquote type=3D"cite">you will only have the design code relative the= target content types. The<br></blockquote></blockquote></blockquote>= <blockquote type=3D"cite"><blockquote type=3D"cite"><blockquote type=3D"cit= e">generic design aspects should be in displayHeaderStandard and<br></block= quote></blockquote></blockquote><blockquote type=3D"cite"><blockquote type= =3D"cite"><blockquote type=3D"cite">displayFooterStandard webskins that can= be shared by all content types.<br></blockquote></blockquote></blockquote>= <blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite"><block= quote type=3D"cite">--<br></blockquote></blockquote><blockquote type=3D"cit= e"><blockquote type=3D"cite">You received this message because you are subs= cribed to the Google Groups "farcry-user" group.<br></blockquote></blockquo= te><blockquote type=3D"cite"><blockquote type=3D"cite">To post to this grou= p, send email to <a href=3D"mailto:farcry-user-/[email protected]">farcry-use= [email protected]</a>.<br></blockquote></blockquote><blockquote type=3D"ci= te"><blockquote type=3D"cite">To unsubscribe from this group, send email to= <a href=3D"mailto:farcry-user+unsubscribe-/[email protected]">farcry-user+un= subscribe-/[email protected]</a>.<br></blockquote></blockquote><blockquote ty= pe=3D"cite"><blockquote type=3D"cite">For more options, visit this group <a= href=3D"athttp://groups.google.com/group">athttp://groups.google.com/group= </a>/farcry-user?hl=3Den.- Hide quoted text -<br></blockquote></blockquote>= <blockquote type=3D"cite"><br></blockquote><blockquote type=3D"cite">- Show= quoted text -<br></blockquote><br>-- <br>You received this message because= you are subscribed to the Google Groups "farcry-user" group.<br>To post to= this group, send email to <a href=3D"mailto:farcry-user-/[email protected]">= farcry-user-/[email protected]</a>.<br>To unsubscribe from this group, send e= mail to <a href=3D"mailto:farcry-user+unsubscribe-/[email protected]">farcry-= user+unsubscribe-/[email protected]</a>.<br>For more options, visit this grou= p at <a href=3D"http://groups.google.com/group/farcry-user?hl=3Den">http://= groups.google.com/group/farcry-user?hl=3Den</a>.<br><br></div></blockquote>= </div><br></div></body></html> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups "= farcry-user" group.<br /> To post to this group, send email to farcry-user-/JYPxA39Uh5TLH3MbocFF+G/[email protected]<br /> To unsubscribe from this group, send email to farcry-user+unsubscribe@googl= egroups.com.<br /> For more options, visit this group at http://groups.google.com/group/farcry= -user?hl=3Den.<br /> --Apple-Mail-265--454086970--