RaythaHQ / raytha

Raytha is a powerful CMS with an easy-to-use interface and fast performance. It offers custom content types, a template engine, and various access controls. It supports multiple storage providers and an automatically generated REST API. Upgrade your development workflow with Raytha.
MIT License
155 stars 30 forks source link

Documentation on custom Raytha liquid functions and filters #112

Closed ismailoo93 closed 1 year ago

ismailoo93 commented 1 year ago

The documentation is off on how to use the custom liquid functions. It should be corrected here: https://docs.raytha.com/articles/templates_custom_funcs.html

apexdodge commented 1 year ago

@ismailoo93

Thanks,

An improved example is:

        {% assign filter = "contains(user_guide,'" | append: Target.PrimaryField | append: "')" %}
        {% assign items = get_content_items(ContentType='posts', Filter=filter, OrderBy="order_to_appear_in_user_guide asc", PageSize=25) %}

        {% if items.TotalCount > 0 %}
        <div id="articles">
          <h2>Table of Contents</h2>   
          <ol>
          {% for item in items.Items %}
              <li><a href="{{ PathBase }}/{{ item.RoutePath }}" target="_blank">{{ item.PrimaryField }}</a></li>
          {% endfor %}
          </ol>
        </div>
        {% endif %}

We will update the docs

apexdodge commented 1 year ago

Also need to document #113

apexdodge commented 1 year ago

And #87 too.