Hublify-CMS - Template Examples

Below you can find some auto-generated examples for direct use within your Hublify-CMS' twig templates.

dataset().all()

Hint: For best performance, retrieve only those fields you really need!

Autogenerated twig-templating source code:


          {# Get all records from dataset "price_group".

             Other retrievable fields of price_group are:
                       'prcgrp_id' - (INT, 11) ID,
                       'prcgrp_label' - (TEXT, 63) Preisgruppen-Label,
                       'prcgrp_name' - (TEXT) Preisgruppen-Name,
                       'prcgrp_desc' - (TEXT) Preisgruppen-Beschreibung,
                       'prcgrp_dsc_scale' - (TEXT) Rabatt-Staffel,
                       'prcgrp_insert_time' - (DATETIME) Angelegt am,
                       'prcgrp_insert_user' - (TEXT, 127) Ersteller,
                       'prcgrp_update_time' - (DATETIME) Geändert am,
                       'prcgrp_update_user' - (TEXT, 127) Letzte Änderung durch,
                #}
          {% set dataList = hublify.dataset('price_group')
              .fields([
                  'prcgrp_id',
                  'prcgrp_label',
              ])
              .filter('','<something>')
              .limit(10)
              .all()
          %}
          

dataset().one()

Hint: For best performance, retrieve only those fields you really need!

Autogenerated twig-templating source code:


          {# Get one record from dataset "price_group".

             Other retrievable fields of price_group are:
                       'prcgrp_id' - (INT, 11) ID,
                       'prcgrp_label' - (TEXT, 63) Preisgruppen-Label,
                       'prcgrp_name' - (TEXT) Preisgruppen-Name,
                       'prcgrp_desc' - (TEXT) Preisgruppen-Beschreibung,
                       'prcgrp_dsc_scale' - (TEXT) Rabatt-Staffel,
                       'prcgrp_insert_time' - (DATETIME) Angelegt am,
                       'prcgrp_insert_user' - (TEXT, 127) Ersteller,
                       'prcgrp_update_time' - (DATETIME) Geändert am,
                       'prcgrp_update_user' - (TEXT, 127) Letzte Änderung durch,
                #}
          {% set dataList = hublify.dataset('price_group')
              .fields([
                  'prcgrp_id',
                  'prcgrp_label',
              ])
              .filter('prcgrp_id','<something>')
              .one()
          %}
      

api(). ... - create

For how-to insert a record...

api(). ... - update

For how-to update a record...

WHAT ELSE, you'd like ??

...