Skip to content

Instantly share code, notes, and snippets.

@StevenLangbroek
Last active December 19, 2015 18:38
Show Gist options
  • Save StevenLangbroek/6000280 to your computer and use it in GitHub Desktop.
Save StevenLangbroek/6000280 to your computer and use it in GitHub Desktop.
Example of using Preload Replace to make your code a bit DRYer.
{preload_replace:c='agenda'}
{exp:channel:entries
channel='{c}'
limit='5'
dynamic='no'
}
<article>
<h2>{title}</h2>
<img src="{{c}_image_main}" alt="{title}">
{{c}_text_body}
</article>
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment