Sha256: 378c11ae74527cd732d2985412086811cbf904c6100d3b2786fd6b9cd3c86411
Contents?: true
Size: 539 Bytes
Versions: 2
Compression:
Stored size: 539 Bytes
Contents
class ComfyPress::Tag::SiteMenu include ComfyPress::Tag def self.regex_tag_signature(identifier = nil) identifier ||= /[\w\-]+/ /\{\{\s*cms:site_menu\s*\}\}/ # not really using identifier end def content site = Cms::Site.find(page.site_id) "<%= render :partial => 'cms_content/menu', locals: {menu_id: #{site.menu_id}} %>" end def render whitelist = ComfyPress.config.allowed_partials if whitelist.is_a?(Array) content if whitelist.member?(identifier) else content end end end
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
comfypress-0.1.4 | db/lib/comfypress/tags/site_menu.rb |
comfypress-0.1.4 | lib/comfypress/tags/site_menu.rb |