Skip to main content
New Participant
May 24, 2012
Question

Include's relative link problem

  • May 24, 2012
  • 2 replies
  • 2750 views

I am doing this on dreamweaver cs4 on my application.cfm page I have the following script 

 

On the page that i'm using the include I have down      I have tried that and several variations and I keep getting an error which says Element BASEPATH is undefined in APPLICATION.  how can i resolve this? 

    This topic has been closed for replies.

    2 replies

    New Participant
    May 24, 2012

    oh ok i just noticed basically my application.cfm code is

    "<cfapplication>

    <cfset application.basePath= GetDirectoryFromPath(CGI.SCRIPT_NAME)>

    </cfapplication>"

    now in my include page I have

    "<cfinclude template="#application.basePath#master.cfm" />"

    and that is when I keep getting the error message element basepath is undefined in application

    Inspiring
    May 24, 2012

    Right before that line, cfdump your application scope to see if the variable is there.

    The problem might be that your application does not have a name.

    New Participant
    May 25, 2012

    I did that I added a name to the application.cfm "<cfset this.name=testname>" and then put "<cfdump var="#application#">" before the include and the application name was there and I enabled robust debugging which said that the error is from the <include template="#application.basePath#master.cfm" /> is there any other method to include a relative link that might work..

    Inspiring
    May 24, 2012

    Your post appears to be incomplete.