Python Forum

Full Version: Django-cms link to a page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Why is that wrong? All urls start with http[s].
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 Plugin
The Link plugin (Figure 6-4) inserts a link into the page content. It can also be used to
insert links inside the Text plugin and the Multi Columns plugin. There are five link types
available—Link (URL), Link to a Page on the Site, Link to an Anchor, Email Link, and
Telephone Link.
But there is no more Link to a Page on the Site in the last version of django-cms
page_url isn't part of a plugin, it's core Django: http://docs.django-cms.org/en/latest/ref...l#page-url

Do other template tags work? What version of Django are you running?
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