1
0

Timeline Theme - added images to static pages

Static pages now use the same method of image assignment as entries.
This commit is contained in:
DonChambers
2019-03-16 13:48:54 -05:00
parent 6c699f2ce5
commit eafb79546d
4 changed files with 28 additions and 1 deletions

View File

@ -34,6 +34,15 @@
</ul>
</nav>
{/if}
{* CUSTOM TO THIS THEME - CUSTOM STATICPAGE IMAGE *}
{if $staticpage_custom.staticpage_image}
{if $staticpage_custom.staticpage_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *}
{$staticpage_custom.staticpage_image}
{else}
{serendipity_getImageSize file=$staticpage_custom.staticpage_image assign="img_size"}
<img class="{if $img_size[0]>=800}image-full-width{else}serendipity_image_left{/if}" src="{$staticpage_custom.staticpage_image}" width="{$img_size[0]}" height="{$img_size[1]}" alt=""/>
{/if}
{/if}
{if $staticpage_content}
<div class="{if $staticpage_articleformat}serendipity_entry_body clearfix{else}staticpage_content{/if}">
{$staticpage_content}