Posts

Slick Circle Slider HUBBL Code

Image
{# Counter Number // Slider 1/4, 2/4...#} {% for item in module.add_slider_item %} {% set href = item.link_field.url.href %} {% if item.link_field.url.type is equalto "EMAIL_ADDRESS" %} {% set href = "mailto:" + href %} {% endif %} {{ item.top_title }} {{ item.title }} {{ item.content }} {% endfor %} {% for item in module.add_slider_item %} {{ item.thumbnail_title }} {% set href = item.link_field.url.href %} {% if item.link_field.url.type is equalt...

Tabber in Tabber

Image
{% if module.header %} {{ module.header }} {% endif %} {% for item in module.add_tab_item %} {% if item.icon.src %} {% set sizeAttrs = 'width="{{ item.icon.width }}" height="{{ item.icon.height }}"' %} {% if item.icon.size_type == 'auto' %} {% set sizeAttrs = 'style="max-width: 100%; height: auto;"' %} {% elif item.icon.size_type == 'auto_custom_max' %} {% set sizeAttrs = 'width="{{ item.icon.max_width }}" height="{{ item.icon.max_height }}" style="max-width: 100%; height: auto;"' %} {% endif %} {% set loadingAttr = item.icon.loading != 'disabled' ? 'loading="{{ item.icon.loading }}"' : '' %} {% endif %} ...

HubDb Simple PRev & next Pagination

{{ module.title }} {% set category = "&category=" ~module.category %} {% set table = hubdb_table_rows(module.hubdbtable_field , category) %} {# set the number of items per batch #} {% set batch_num = 6 %} {# set the number of pages #} {% if table|length % batch_num == 0 %} {% set number_of_pages = (table|length|divide(batch_num) %} {% else %} {% set number_of_pages = (table|length / batch_num) %} {% endif %} {# set the active batch #} {% if Query.page_num %} {% set page_num = Query.page_num %} {% else %} {% set page_num = 1 %} {% endif %} {% for row in table|batch(batch_num, '') %} {% if loop.index == page_num %} {% for innerRow in row %} {% if innerRow.name %} {{ innerRow.category }} {{ innerRow.name }} {{ innerRow.description }} Learn more ...

Embed Vimeo video in CMS

$(function() { var iframe = $('#player1')[0]; var player = $f(iframe); var status = $('.status'); // When the player is ready, add listeners for pause, finish, and playProgress player.addEvent('ready', function() { status.text('ready'); player.addEvent('pause', onPause); player.addEvent('finish', onFinish); player.addEvent('playProgress', onPlayProgress); }); // Call the API when a button is pressed $('button').bind('click', function() { player.api($(this).text().toLowerCase()); }); function onPause() { status.text('paused'); } function onFinish() { status.text('finished'); } function onPlayProgress(data) { status.text(data.seconds + 's played'); } }); div { margin-top: 3px; padding: 0 10px; } button { font-family: 'Helvetica Neue', Helv...

Remove Time from date In Rss or other global modules.

HubDB Inner (Dynamic Page ) - Pagination

Image
{% if dynamic_page_hubdb_table_id %} {% set filterData = 'orderBy=hs_created_at' %} {% set paginationPost = hubdb_table_rows(dynamic_page_hubdb_table_id, filterData) %} {% for post in paginationPost %} {% if dynamic_page_hubdb_row.hs_path == post.hs_path %} {% set prevPostIndex = loop.index + 1 %} {% set nextCount = loop.index - 1 %} {% endif %} {% if loop.index == prevPostIndex %} {{ post.hs_name }} {% endif %} {% if dynamic_page_hubdb_row.hs_path == post.hs_path %} {% for post in paginationPost %} {% if loop.index == nextCount %} {{ post.hs_name }} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endif %}

Dynamic Pages Number Pagination in HubDB (Listing)

**// Filter (Show only Upcoming Event Posts) with Sorting (By Event Date)** {% if dynamic_page_hubdb_table_id %} List View Calendar View {% set batch_num = 6 %} {% if not request.query_dict.page %} {% set page_num = 1 %} {% set offset_num = 0 %} {% elif request.query_dict.page %} {% set page_num = request.query_dict.page %} {% set offset_num = page_num|add(-1) * batch_num %} {% endif %} {% set current_dt = unixtimestamp(local_dt) %} {% set query = "event_date__gte="~current_dt~"&orderBy=event_date&limit=" ~ batch_num ~ "&offset=" ~ offset_num %} {% set eventsList = hubdb_table_rows(dynamic_page_hubdb_table_id, query) %} {% for item in eventsList %} {% if (item['eve...