+ Reply to Thread
Results 1 to 5 of 5

Thread: Listing Box plugin change to Small Thumb Grid

  1. #1

    Listing Box plugin change to Small Thumb Grid

    Dear Flynax Family,

    Is there any way if I can set flynax to change Display mode from Default to Small Thumb Grid based on screensize. Like if screensize width is > 900 then it is default, but if it is <899 then it show as small thumb grid?

    I look at the plugin and found this part in listing_box_block.tpl, I think this is where it control the display view

    <!-- listings boxes -->
    {rlHook name='featuredTop'}

    {if !empty($listings_box)}
    <ul id="listing_box_{$block.ID}" class="row featured{if $box_option.display_mode == 'grid'} lb-box-grid{/if} with-pictures">
    {foreach from=$listings_box item='featured_listing' key='key' name='listingsF'}{strip}
    {assign var='type' value=$featured_listing.Listing_type}
    {assign var='page_key' value=$listing_types.$type.Page_key}
    {if $box_option.display_mode == 'default'}
    {include file='blocks'|cat:$smarty.const.RL_DS|cat:'feature d_item.tpl'}
    {elseif $box_option.display_mode == 'grid'}
    {include file=$smarty.const.RL_PLUGINS|cat:'listings_box'|c at:$smarty.const.RL_DS|cat:'listings_box.grid.tpl' }
    {/if}
    {/strip}{/foreach}
    </ul>
    {else}
    {if $config.mod_rewrite}
    {assign var='href' value=$rlBase|cat:$pages.add_listing|cat:'.html'}
    {else}
    {assign var='href' value=$rlBase|cat:'index.php?page='|cat:$pages.add _listing}
    {/if}
    {assign var='link' value='<a href="'|cat:$href|cat:'">$1</a>'}
    {$lang.no_listings_here|regex_replace:'/\[(.+)\]/':$link}
    {/if}
    <!-- listings boxes end -->

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,162
    Hello,

    You can use jquery code in your tpl:
    Code:
    Only registered members can view the code.

  3. #3
    Quote Originally Posted by Rudi View Post
    Hello,

    You can use jquery code in your tpl:
    Code:
    Only registered members can view the code.
    And I thought this thread is forgotten. Thanks Rudi for your reply, but I think you misread my request. I think your code is for grid mode in listing list for template/tpl/blocks/listing.tpl, which change listing list view.

    My question was for listing box plugin, I created a listing box using recently added type for homepage. The file im looking at is located at domain.com/plugins/listings_box/listings_box.block.tpl that has the following code:

    <!-- listings boxes -->
    {rlHook name='featuredTop'}

    {if !empty($listings_box)}
    <ul id="listing_box_{$block.ID}" class="row featured{if $box_option.display_mode == 'grid'} lb-box-grid{/if} with-pictures">
    {foreach from=$listings_box item='featured_listing' key='key' name='listingsF'}{strip}
    {assign var='type' value=$featured_listing.Listing_type}
    {assign var='page_key' value=$listing_types.$type.Page_key}
    {if $box_option.display_mode == 'default'}
    {include file='blocks'|cat:$smarty.const.RL_DS|cat:'feature d_item.tpl'}
    {elseif $box_option.display_mode == 'grid'}
    {include file=$smarty.const.RL_PLUGINS|cat:'listings_box'|c at:$smarty.const.RL_DS|cat:'listings_box.grid.tpl' }

    {/if}
    {/strip}{/foreach}
    </ul>
    {else}
    {if $config.mod_rewrite}
    {assign var='href' value=$rlBase|cat:$pages.add_listing|cat:'.html'}
    {else}
    {assign var='href' value=$rlBase|cat:'index.php?page='|cat:$pages.add _listing}
    {/if}
    {assign var='link' value='<a href="'|cat:$href|cat:'">$1</a>'}
    {$lang.no_listings_here|regex_replace:'/\[(.+)\]/':$link}
    {/if}
    <!-- listings boxes end -->
    In admin panel, there is setting for listing box for display mode as Default or Small Thumb Grid, I want it to change to Small Thumb Grid when screensize if below 899 px. Hope this is clearer

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,162
    Unfortunately, it will requrie a customization

  5. #5
    Quote Originally Posted by Rudi View Post
    Unfortunately, it will requrie a customization
    I see. Thanks Rudi for your help

+ Reply to Thread