Helping you work smarter

Surreal CMS relative links being overwritten

From: Surreal CMS Support <support@surrealcms.com>
Date: 4 June 2014 12:30
Subject: Re: CMS using wrong link path
To: Cesar Ace Lacierda <cesar@infoage.co.nz>

Ok, I see how you’ve set things up. It looks like the content of each “page” is included into another page which happens to be in a different directory. Because Surreal generates relative URLs by default, the links “break” when the pages get included.
To fix this, simply add the data-urls attribute to each editable region like I suggested below. This will tell the CMS to generate absolute URLs so they always point to the correct place, even when they’re included. Here’s an example:
<div class=”editable” id=”your-id” data-urls=”absolute”>
    …
</div>
Let me know if there’s anything else I can help you with!
— Cory
 
 
Is our support awesome or what? Tell us on Twitter!

Leave a Reply

Your email address will not be published. Required fields are marked *