Contents can make select queries to the database.

Example Query:
{$articles = “articles”|select:[‘title’, ‘article_category_id’], [‘id < 15’], ‘id DESC’}

{foreach $articles as $article}
{$article.title}
{/foreach}

Note: SELECT queries are cached automatically by using hash of the query. If you want to disable caching on a query, you may use {disable_cache} function inside the widget and use {enable_cache} to reenable the cache for that widget.

Cache duration is 1 minutes by default, if you want to change cache duration. You may use {cache_duration duration=“120”} inside the widget to update the duration.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment