well what i am trying todo on this one is put everything into 1 Application.cfc instead of 2
so in this perticular case I am using xhtml strict and no tables, i make a template and cut the code in half for a header and footer and the admin sction is the same but it gets a diff pic on banner so I want to check and see if the user is in the admin section and if so use a diff header and footer. and then of course to do things such as check for logins and add code to only pages that need it like js files and to switch css files too. So on those pages I put the simple script to see if it would pick out if you are in the admin or not and it works fine then i move the script to application.cfc and replace the words with includes to the diff headers and footers and it doesnt work. But yeah i put them on the pages to make sure that "contains" would work and it does. And yes I outputed the # GetDirectoryFromPath(GetCurrentTemplatePath())# I have no idea either why the headers and footers arent being switched either.... it will end up being "user error" u can bet on that though! ;)~ ~Dave the disruptor~ "Some people just don't appreciate how difficult it is to dispense wisdom and abuse at the same time." ---------------------------------------- From: "Bobby Hartsfield" <[EMAIL PROTECTED]> Sent: Thursday, November 03, 2005 4:58 PM To: CF-Talk <[email protected]> Subject: RE: determining if template is isn a specific folder I'm not sure what you're saying. I see (what appear to be the correct) messages on those pages. "this page IS NOT nested in the admin structure" on the admin page "this page IS nested in the admin structure" on the other page I haven't used "contains" so I don't know if that might be causing a problem or not. You're not new to this so I'm sure you've output # GetDirectoryFromPath(GetCurrentTemplatePath())# to see what it actual has in it. Since you are displaying the conditional messages, I don't see why your header variable would be any different. ...:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: dave [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 2:10 PM To: CF-Talk Subject: RE: determining if template is isn a specific folder however if i do something like this (below) it doesnt work???? I can put it on indiv pages with a message instead of header and it works but as it is it just shows the non admin header examples http://65.36.226.10/content/contact.cfm http://65.36.226.10/admin/news/addNews.cfm in application.cfc ~Dave the disruptor~ "Some people just don't appreciate how difficult it is to dispense wisdom and abuse at the same time." ---------------------------------------- From: "dave" Sent: Thursday, November 03, 2005 1:36 PM To: CF-Talk Subject: RE: determining if template is isn a specific folder yup that works :) I was doing the same thing with cgi scope but wouldnt work, didnt even think bout this one. Thanks ~Dave the disruptor~ "Some people just don't appreciate how difficult it is to dispense wisdom and abuse at the same time." ---------------------------------------- From: "Bobby Hartsfield" Sent: Thursday, November 03, 2005 8:02 AM To: CF-Talk Subject: RE: determining if template is isn a specific folder You should be able to get what you need from this #GetDirectoryFromPath(GetCurrentTemplatePath())# ......:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: dave [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 1:30 AM To: CF-Talk Subject: determining if template is isn a specific folder i want to check to see if the page is sitting with a certain folder and then run some code (in Application.cfc) I know how to do it with a specific file like index.cfm but what about a folder? say if the folder is "stuff" and there is a folder tree like so root stuff admin stlesheets images cfcs and im i want to look and see if the template being called is from the "stuff" folder, how would i pick that out? can I use "contains", i tried it but no luck ~Dave the disruptor~ "Some people just don't appreciate how difficult it is to dispense wisdom and abuse at the same time." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223121 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

