I think the only case where the slug will change on it's own is if you
haven't modified it and you move the page to be child of another page.
While it's not built in, it should be easy to make a template tag that
looks up a page url by id, something like:
@register.filter
def absolute_url_by_id(page_id):
return Page.objects.get(id=page_id).get_absolute_url()
in a template:
{% load whatever_tags_that_is_in %}
<a href="{{ page.id|absolute_url_by_id }}">...</a>
You might want to clean that up a bit to handle a nonexistant id, but I
think that's the gist of it.
On Wed, Aug 12, 2015 at 12:50 AM, Tom Lockhart <[email protected]>
wrote:
>
> On Aug 11, 2015, at 21:38, Brian Clarke <[email protected]> wrote:
>
> Hi all, my question relates the the link reference. The MODx CMS used a
> unique page identifier using the square brackets and the tilde <a href="
> *[[~56]]*"> which allowed the pages to be moved around or names changes
> without breaking. I have searched and cannot find anything about this for
> Mezzanine. Can anyone point me in the right direction?
>
>
> afaik the absolute URL associated with the page does not change after the
> slug has been set. Unless of course the slug gets reset.
>
> hth
>
> - Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.