Log in to the Zotonic administration interface.
Create Predicates:
- Links (text-> text)
- Paper (text-> document)
- Webinars (text-> text)
These predicates are then displayed in Page Links in the page editor. Add links to other pages, links to documents, and links to web pages this way.
_article_sidebar.tpl :
{% with m.rsc[id].links as texts %}
{% if texts %}
<h2>See also:</h2>
<ul>
{% for text in texts %}
<li><a href="{{ m.rsc[text].page_url }}" {% ifequal text id %}class="current"{% endifequal %}>{{ m.rsc[text].title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
{% with m.rsc[id].white_papers as texts %}
{% if texts %}
<h2>White papers:</h2>
<ul>
{% for text in texts %}
<li><a href="{{ m.rsc[text].page_url }}" {% ifequal text id %}class="current"{% endifequal %}>{{ m.rsc[text].title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
{% with m.rsc[id].webinars as texts %}
{% if texts %}
<h2>Related webinars:</h2>
<ul>
{% for text in texts %}
<li><a href="{{ m.rsc[text].page_url }}" {% ifequal text id %}class="current"{% endifequal %}>{{ m.rsc[text].title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
, RSC (, ..) Zotonic. Predicate RSC RSC Zotonic. RSC.
. m.rsc[id].links RSC, .
m.rsc[id] RSC . m.rsc[text] RSC RSC.
{% ifequal text id %}class="current"{% endifequal %} CSS, , , .