Skip navigation
AspiringDIV
Currently Being Moderated

Weird behaviour with image paths

Aug 21, 2012 3:33 AM

Morning all,

 

I have some strange behaviour going on with my image paths, and wondered if anyone might be able to spot what they think is going on?

 

On my template relative paths (../Images/example.jpg) work just fine.

 

However, on child pages the same relative paths  are not showing the images and so I've had to remove the '.../' to get them to work (ending up with Images/example.jpg).

 

This obviously isn't desirable as I'm manually having to tweak child pages where editable region content has been copied directly from the template which works just fine.

 

Any ideas what might be up?

 

Thanks in advance

 
Replies
  • Currently Being Moderated
    Aug 21, 2012 4:59 AM   in reply to AspiringDIV

    So in the template you have links that are NOT being managed by DW when you spawn child pages?  In other words, the template would have a link -

     

    <img src="../path_to_image.jpg"

     

    and when you spawn a child from that template and save the new child at the root level, the child has that same link -

     

    <img src="../path_to_image.jpg"

    ??

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 21, 2012 5:26 AM   in reply to AspiringDIV

    You would never want to do that with templates (copy content from template to child).  Notwithstanding that, though, I don't understand why you would ever want to do that.  When you create a child from a template, the resulting page has all of the content that is on the template, including the content in the editable regions.  Is it that you CHANGED the template by adding content with links to an editable region after creating some child pages?  If that is the case, the best way to handle that would be to either APPLY the template to the legacy pages, or to spawn new child pages, and copy/paste existing content into the new pages before saving the new pages with the same filenames as the legacy pages.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 21, 2012 9:26 AM   in reply to AspiringDIV

    You have not yet grasped the prime directive of templates, which is that only changes to non-editable regions in the template will propagate to child pages.  If this were not true, then one could never put unique content on a child page!

     

    So - the scheme is this:

     

    1.  Create a template and save it.

    2.  Spawn a child page from the template.  The child page will be an 'identical' copy of the template.

    3.  Add unique content to the child page.  The child page is now no longer an 'identical' copy of the template.

    4.  Change something in the NON-EDITABLE portion of the template and save it - all child pages receive the change.

    5.  Change something in the EDITABLE portion of the template and save it - no child pages receive the change.

    6.  Spawn a NEW page from the template, and it is again an 'identical' copy of the NEW CHANGED template.

     

    See how this works?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 8:30 AM   in reply to AspiringDIV

    Excellent - good luck!

     
    |
    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