Skip to content

Instantly share code, notes, and snippets.

@SamWhited
Created March 9, 2012 00:07
Show Gist options
  • Save SamWhited/2004262 to your computer and use it in GitHub Desktop.
Save SamWhited/2004262 to your computer and use it in GitHub Desktop.
Radiant snippet for inserting content on pages whose path contains a date (Archive page)
<r:hide>
Insert content only if we're viewing a news item.
Matches any path that contains "/news/yyyy/mm/dd/"
</r:hide>
<r:if_path matches="\/news\/(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])\/" ignore_case="true">
<r:yield />
</r:if_path>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment