One image with a link
One picture, linked to a page.
Life cycle: Build, example 11 of 35. Worked out on the Fit & Healthy site of Exponential 6.0.15+.
Contents
In the Layouts editor
- Open Layouts > Layouts and the layout Landing Page / Home; the editor opens it in a draft.
- Open the block palette (+ at the top left) and drag Image (group Basic) into the zone
main. - Select the block, open the Design tab and fill Image URL, Alt text and Link URL.
- Publish layout. The pages that use the layout show the block on their next view.
Image URL takes an address; an image from the Media library is addressed by its stored file (see the Hero walkthrough, which used a /var/<site>/storage/images/... path).
With templates
- Print the image field of a content item with an image alias, so the size is generated for you:
def $article = fetch( 'content', 'node', hash( 'node_id', 93 ) )
<a href=$article.url_alias|ezurl>attribute_view_gui attribute=$article.data_map.image image_class=i480</a>
undef $articleWhich to choose
The template way follows the content (a new picture on the article shows everywhere); the block holds one fixed address.
Check
- The image has alternative text.
Related pages
- The Design tab
- Build examples, every page
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.