|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Phantom Directory
I have created an index page which is constructed of a start module and a stop module (both cfmodule). The start is a menu which is made using html ul and li statements which have an href in each of the li's....to go to another page..the interesting thing happening is when the top level (ul) of the menu is selected, it displays the <li's> associated with the ul...these too have hrefs....when the second href is selected, either html or cf is inserting a redundant directory level...
ie....first ul has 10 uls permitting a selection of another menu level http://www.site/index2008.cfm the selected page is http://www.site/bca/indexbca8.cfm which displays the li's one of which is http://site/bca/directorsbca8.cfm when this is selected either the browser or cf is generating the following: http://www.site/bca/bca/directorsbca8.cfm and i get the 404 error....any one have an idea what i am doing wrong? thanks is advance. bob |
|
#2
|
||||
|
||||
|
since we can't go to your site, can you post some code?
__________________
The liver is evil and must be punished! |
|
#3
|
|||
|
|||
|
Yeah I'm not understanding the question from your description. But CF doesn't "insert" anything into your generated HTML so the problem is definitely in your code somewhere. Without seeing code (and please, only post the relevant code don't post 100+ lines of code or I simply won't have the time to go through it) it's impossible to offer any advice.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#4
|
|||
|
|||
|
abslolutely ... hope this brief sample provides what you need:
directory invokes index2008 which does a couple database gets. and loads start and stop modules as follows: <cfmodule template="templates/headStart8.cfm"> <cfmodule template="templates/headStop8.cfm" menuid="1"> headstart8 simply loads a banner and logo... headstop8 loads the menu a portion of follows: <div id="row4"> <cfif isDefined("attributes.menuID")> <cfset menuID = #attributes.menuID#> <cfelse> <cfset menuID = 0> </cfif> <div id="row4Left"> <cfif #menuID# EQ 1> <div id="row4menuItemActive"> <cfelse> <div id="row4menuItem"> </cfif> <a href="index2008.cfm">Home Page / News Bulletins</a> </div> <cfif #menuID# EQ 2> <div id="row4menuItemActive"> <cfelse> <div id="row4menuItem"> </cfif> <a href="news/indexn8.cfm">Newsletters</a> <cfif #menuID# EQ 2> <ul> <li><a href="news/indexn8.cfm">2008 Newsletters</a></li> <li><a href="news/news2007n8.cfm">2007 Newsletters</a></li> <li><a href="news/newsarchn8.cfm">Archived Newsletters</a></li> </ul> </cfif> </div> <cfif #menuID# EQ 3> <div id="row4menuItemActive"> <cfelse> <div id="row4menuItem"> </cfif> <a href="contacts/indexc8.cfm">Contacts / Questions</a> <cfif #menuID# EQ 3> <ul> <li><a href="contacts/indexc8.cfm">How to Contact the GCA</a></li> <li><a href="contacts/communityc8.cfm">Community Contacts & Links</a></li> <li><a href="contacts/faqc8.cfm">Frequently Asked Questions</a></li> </ul> </cfif> </div> if I click on the newsletters entry, the menu is expanded to display the <li> entries - then when i click on the <li>, example: <li><a href="news/news2007n8.cfm">2007 Newsletters</a></li> browser tries to locate news/news/news2007n8.cfm....symptom is same for other menus....hope this helps...if not, would be more than willing to send you via email the actual site to look at it....thanks bob |
|
#5
|
|||
|
|||
|
You must be calling it from inside the /news directory, which is why the browser is starting there and appending "news/foo.cfm" from that starting point. This is a pathing issue. You'll either need to remove the "news/" from your links, or use the full path from the site root to the target file, i.e. "/news/foo.cfm" instead of "news/foo.cfm".
|
|
#6
|
|||
|
|||
|
Thank you....it was the problem....
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Phantom Directory |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|