Django-cms link to a page - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Django-cms link to a page (/thread-9372.html) |
Django-cms link to a page - Alkatron - Apr-04-2018 Hello i'm stuck with a stupid problem probably. I'm trying to insert a link to another page on the same site in a text plugin, but i can't figure out how... I tried {% page_url ... %} but the link became "http://...../{% page_url ...%}" obviously wrong :) Thanks RE: Django-cms link to a page - nilamo - Apr-04-2018 Why is that wrong? All urls start with http[s]. RE: Django-cms link to a page - Alkatron - Apr-05-2018 Tnx for the answer and sorry for my english, i meant it does not translate the template tag {%page_url 'article1detailed'%}, it should became http://127.0.0.1:8000/dcms/art1 while it remains http://127.0.0.1:8000/dcms/{%page_url 'article1detailed'%} I don't want to hardcode the link, because if I move the page in the tree, i'll have to change all the links manually :) I'm sure i'm missing something very stupid...but the tutorial and documentation lack of examples :) On this book beginning django-cms i found Quote:The Link PluginBut there is no more Link to a Page on the Site in the last version of django-cms RE: Django-cms link to a page - nilamo - Apr-05-2018 page_url isn't part of a plugin, it's core Django: http://docs.django-cms.org/en/latest/reference/templatetags.html#page-urlDo other template tags work? What version of Django are you running? RE: Django-cms link to a page - Alkatron - Apr-06-2018 I supposed so, that was a desperate attempt :) Django (1.11.11) django-cms (3.5.1) Python 3.4.2 What's the correct way to add a link(to a page on the same site) in a text plugin using the name or id, without hardlinking it? Thanks |