LinkList

A LinkList object contains a list of links, ordered by some manual scheme. Each of such links can have additional LinkList’s, enabling sub-menus. The structure contains the following fields:

Variable name Object Description Note
id int This is an internal numeric id of the LinkList.  
handle string Returns a handle which identifies the LinkList.  
links List<Link> The individual Link items in the list (usually the menu items of a menu entry).  
size int The number of entries in the link list.  
title string The title of the link list (usually the name of the menu entry in the menu bar).  

Example:


 {% for level1 in linklists.main-menu.links %}
   <p style="margin-left:0px;">
     <a href="/{{ level1.url }}">
       {% if level1.active %}<b>{% endif %}
         {{ level1.title }}
       {% if level1.active %}</b>{% endif %}
     </a>
   </p>
   {% if level1.type == 'linklists_link' %}
     {% for level2 in level1.object.links %}
       <p style="margin-left:50px;">
         <a href="/{{ level2.url }}">
           {% if level2.active %}<b>{% endif %}
             {{ level2.title }}
           {% if level2.active %}</b>{% endif %}
         </a>
      </p>
      {% if level2.type == 'linklists_link' %}
        {% for level3 in level2.object.links %}
          <p style="margin-left:100px;">
            <a href="/{{ level3.url }}">
              {% if level3.active %}<b>{% endif %}
                {{ level3.title }}
              {% if level3.active %}</b>{% endif %}
            </a>
          </p>
          {% if level3.type == 'linklists_link' %}
            {% for level4 in level3.object.links %}
              <p style="margin-left:150px;">
                <a href="/{{ level4.url }}">
                  {% if level4.active %}<b>{% endif %}
                    {{ level4.title }}
                  {% if level4.active %}</b>{% endif %}
                </a>
              </p>
            {% endfor %}
          {% endif %}
        {% endfor %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endfor %}

Output:


 <p style="margin-left:0px;">
   <a href="/">
     Home
   </a>
 </p>
 <p style="margin-left:0px;">
   <a href="/all/c/0">
     <b>
       Catalog
     </b>
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/all/c/1">
     All
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/animation/c/196">
     <b>
       Animation
     </b>
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/comedy/c/197">
     Comedy
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/sci-fi/c/198">
     Sci-Fi
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/bestsellers/c/4">
     Bestseller
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/best_rated/c/5">
     Best rated
   </a>
 </p>
 <p style="margin-left:0px;">
   <a href="/player">
     My content
   </a>
 </p>
 <p style="margin-left:0px;">
   <a href="/howitworks">
     More
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/howitworks">
     Try now
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/page/faq">
     FAQ
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/support">
     Support
   </a>
 </p>
 <p style="margin-left:50px;">
   <a href="/page/terms">
     Terms
   </a>
 </p>