Created
December 17, 2010 03:56
-
-
Save ramontayag/744465 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LiquidTemplatingHelper | |
def liquidize(content, args) | |
Liquid::Template.parse(content).render(args, :filters => [LiquidFilters]) | |
end | |
def liquidize_snippets(snippettable) | |
text = "" | |
snippettable.scheme.snippets.each do |snippet| | |
s = div_for(snippet) { liquidize(snippet.content, 'object' => snippettable, 'images' => current_site.images.all) } | |
text << s | |
end | |
text | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= div_for @page do | |
!= liquidize_snippets(@page) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment