Problem:
I needed to show a static image banner at the top of a web page with a large <h1> text heading on top of the banner. The background image changes randomly on each page refresh. I couldn't get the heading to sit on top of the background image (tried css styling's z-index without success).
Solution:
Create a new Gallery template.
Gallery template:
Code: Select all
{foreach from=$images item=image}
{if !$image->isdir}
<div class="some-class" style="background:url('{$image->thumb}') no-repeat top center;">
<h1>{menu_text}</h1>
</div>
{/if}
{/foreach}
Page template:
Code: Select all
{Gallery dir='galleryname' number="1" action="showrandom"}