• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Smarty Help: Responsive Images
PostPosted: Mon Jul 09, 2018 2:07 pm 
Offline
Forum Members
Forum Members

Joined: Wed Sep 26, 2007 10:53 pm
Posts: 29
I'm using a theme based on Foundation with the following code blocks:

Early in Head:
{block name='top'}
{* Define the main content block, and header image. Three versions of the header image are requested, which allows for smaller versions to be served for mobile devices *}
{$content="{content}" scope=global}
{$header_large="{content_image block='header_large' tab='Images' label='Header Image (desktop: at least 1200px wide)' urlonly=1}" scope=global}
{$header_medium="{content_image block='header_medium' tab='Images' label='Header Image (tablet: 1024px wide)' urlonly=1}" scope=global}
{$header_small="{content_image block='header_small' tab='Images' label='Header Image (mobile: 640px wide)' urlonly=1}" scope=global}
{/block}

Then, there a header image is called using Interchange:
{block name='header-image'}
{* Header image uses the Interchange plugin - see the Zurb Foundation documentation for more information *}
{if $header_large}
<div id="header-image" class="row expanded text-center">
<img alt="{title}" data-interchange="[{$header_small}, small], [{$header_medium}, medium], [{$header_large}, large]">
</div>
{/if}
{/block}

I have experimented with assigning the internal urls to each size image, but I've not gotten it right. Where/how is this done?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Smarty Help: Responsive Images
PostPosted: Mon Jul 09, 2018 2:18 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 465
Location: Victoria, BC
Those are content blocks, so they'll be populated when editing the content page, under a tab called "Images"


Attachments:
File comment: screenshot
images_tab.png
images_tab.png [ 191.99 KiB | Viewed 252 times ]

_________________
Not getting the answer you need? CMSMS support options


Last edited by DIGI3 on Mon Jul 09, 2018 2:19 pm, edited 1 time in total.
add image
Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: [solved] Re: Smarty Help: Responsive Images  Topic is solved
PostPosted: Mon Jul 09, 2018 2:25 pm 
Offline
Forum Members
Forum Members

Joined: Wed Sep 26, 2007 10:53 pm
Posts: 29
Thanks. That was easy.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting