From 77839bbc746cc363c787443fa11caec3c43635ff Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Sun, 10 Nov 2024 10:00:45 +0100 Subject: [PATCH] Update readme --- README.rst | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/README.rst b/README.rst index ebbed598..ac3635d8 100644 --- a/README.rst +++ b/README.rst @@ -204,23 +204,15 @@ the new template tag ``to_url``. The ``type`` property returns the link type:: {# Variant 1 #} {% if obj.link %} - Link available + Link available {# str(obj.link) gives the URL #} {% endif %} {# Variant 2 #} - {% load djangocms_link_tags %} {% if obj.link %} - Link + Link {# explicitly get the URL #} {% endif %} - {# Variant 3 #} - {% with url=obj.link|to_url %} - {% if url %} - Link available - {% endif %} - {% endwith %} - - {% if obj.link.type == "external_link" %} + {% if obj.link.type == "external_link" %} {# evaluate link type #} External link {% endif %}