Skip to content

Instantly share code, notes, and snippets.

@DESIGNfromWITHIN
Forked from opengeek/optimized.html
Created September 18, 2012 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DESIGNfromWITHIN/3745225 to your computer and use it in GitHub Desktop.
Save DESIGNfromWITHIN/3745225 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