Skip navigation
sherleon
Currently Being Moderated

Template Problem

Sep 2, 2012 10:35 AM

Tags: #cs4 #template #file_reference

My template contains this file reference:
<a href="../../racing/calendar/eventDetail.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "ID=" & rsdistrictEvents.Fields.Item("ID").Value %>" target="_blank" class="magenta"><%=(rsdistrictEvents.Fields.Item("regatta").Value)%>< /a></td>

 

When applying the template, this is what happens:

<a href="file:///C|/inetpub/racing/calendar/eventDetail.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "ID=" & rsdistrictEvents.Fields.Item("ID").Value %>" target="_blank" class="magenta"><%=(rsdistrictEvents.Fields.Item("regatta").Value)%>< /a></td>

 

 

 

 

 

Why is the href resolving to file:///C/inetpub/ ? I there a way to correct this problem?

 
Replies
  • Currently Being Moderated
    Sep 2, 2012 10:38 AM   in reply to sherleon

    Did you save the file within the defined site?  If a file is not saved within a defined DW site, the paths will be local paths until the file is saved.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 2:37 PM   in reply to sherleon

    File > New > Page from Template (select your template.dwt).

    SaveAs test.html

    Switch to code view, what do you see?

     

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 2:51 PM   in reply to sherleon

    file:///C|/inetpub/racing/calendar/

     

    Is that the path to your local root folder as stated in your site definition?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 2, 2012 2:52 PM   in reply to Nancy O.

    Probably should insert an image or create a link to another page before saving, Nancy.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 3, 2012 4:34 AM   in reply to sherleon

    Is there a clue there?

     

    Yes.

     

    I did exactly that and got the same result.

     

    Your link is this -

     

    When applying the template, this is what happens:

    <a href="file:///C|/inetpub/racing/calendar/eventDetail.asp

     

    DW thinks that this file is NOT IN THE LOCAL ROOT FOLDER, so it makes the kind of link that allows it to work with files that are outside of your site. This almost always means that your site is not defined properly.  In your site definition, what is the path to your local root folder?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points