Skip to content

Instantly share code, notes, and snippets.

@fomigo
Forked from opengeek/optimized.html
Created September 19, 2012 09:21
Show Gist options
  • Save fomigo/3748658 to your computer and use it in GitHub Desktop.
Save fomigo/3748658 to your computer and use it in GitHub Desktop.
Example of optimizing conditional filters using a Chunk wrapper
[[[[*page-image:notempty=`$wrapImgThumb? &src=`*page-image` &alt=`[[*pagetitle]]` &thumbOpts=`w=480&h=320``]]]]
[[*page-image:notempty=`<img src="[[*page-image:phpthumbof=`w=480h=320`]]" alt="[[*pagetitle]]" />`]]
<img src="[[[[+src]]:phpthumbof=`[[+thumbOpts]]`]]" alt="[[+alt]]" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment