Setting the template path

Some components use the ts_load_more AJAX action hook, which is passed to a Twig template to render the output. For the hook to know which template-path to use, we need to set the template path using the twig_ajax_template_{$template} and twig_ajax_nopriv_template_{$template} hooks. A simple example For instance, let’s assume that for your component that you’re using…

Read More

Filter Datalist Template

The filter datalist component is a filter component that can help you create quick, fast but static javascript search options. It takes a datalist options array that is rendered to the browsers backend for the search values. On the frontend it will look similar to a Select2 dropdown field, but it does not use an…

Read More

Pagination

The pagination component adds clever pagination to your page or Timber Posts Module. When running a posts query through the Timber Posts Module, the Timber Query context contains the pagination parameters for that query. Using the posts.pagination.current and posts.pagination.total values in combination with the query.vars.posts_per_page that we have set we can have it generate paginated…

Read More