Connect Content with Channels in Modyo

Felipe Meyer

Felipe Meyer

One of the great features that we have in Modyo is our independent content management system in Content. We're going to demonstrate how the Liquid SDK works to be able to connect Content with Channels, our web application and content manager solution.

The first thing we have to do is have a Space and a Type with content already loaded and with a liquid assign we are going to call them from a page.

In the following example, entries is assigned all entries from space 'space_uid' with type 'type_uid'.

{% assign entries = spaces['space_uid'].types['type_uid'].entries %}

Next, we display the entries using a for, printing the 'meta.uuid' and 'meta.title' from each entry.

{% for entry in entries %}
  entry: {{ entry.meta.uuid }} - Connect Content with Channels in Modyo 
{% endfor %}

Now we can generate the HTML using Liquid Drops. Using output statements we will print the meta.title and fields.name.

{{ entry.meta.title }}
{{ entry.fields.name }} 
Filters

The assign created previously will return a loop of all entries, if we want to filter them further, we can use Liquid filters in the same assignment:

{% assign entries = spaces['space_uid'].types['type_uid'].entries | by_category: 'news' | by_tag: 'devs' | sort_by: 'fields.date' , 'desc' | limit 8%}

In this example we filter by the category 'news' with tag 'devs', then we sort them by 'fields.date' with a limit of 8 entries.

To see more examples of what you can do with Liquid SDK in Modyo, see Public API Reference in Modyo Docs.

Photo by Kelly Sikkema on Unsplash.

Other Developer Tips

Contents
Carlos Solís

Carlos Solís

Consume APIs with the Modyo SDK in your JavaScript app

Learn how to easily integrate Modyo’s headless API into your JavaScript app using its SDK. Follow a step-by-step guide with a React example for seamless consumption.

Photo by Adi Goldstein on Unsplash
Channels
Carlos Solís

Carlos Solís

Configure Security Headers in Modyo to Strengthen Your Website

In a digital environment where threats are constant, ensuring the security of websites is essential. One of the best ways to protect your applications is through Security Headers, HTTP configurations that act as protective barriers against attacks

Architecture
Carlos Solís

Carlos Solís

Domain Driven Design: How to Implement a Scalable Architecture for Your Business

Learn how Domain Driven Design (DDD) empowers you to build applications that align with your business. Apply DDD in microservices and micro frontends architectures to create scalable,and maintainable solutions,leveraging the power of Modyo.