Sha256: 9363300c56a3e14dcc38b6634090fa9aa354e4666568b3c6304d784bbc886e2a
Contents?: true
Size: 1.47 KB
Versions: 20
Compression:
Stored size: 1.47 KB
Contents
module Tags::HeaderTags include TrustyCms::Taggable desc "Meta Tags" tag "festivity_meta" do |tag| page = Page.find_by_slug_for_site(tag.locals.page.slug).first page = Page.current_site.homepage unless page description = get_content(page, :description) keywords = get_content(page, :keywords) domain = "#{request.protocol}#{request.host}" request.env["action_controller.instance"].render_to_string :partial => "header/meta_tags", :locals => {:domain => domain, :description => description, :keywords => keywords, :page => page, :url => request.url} end desc "Omniture Variables" tag "omniture_vars" do |tag| domain = "#{request.protocol}#{request.host}" if tag.locals.page.breadcrumb %{<script language="JavaScript" type="text/javascript"><!-- s.pageName="#{domain}:#{tag.locals.page.breadcrumb}"; s.channel="#{domain}:#{tag.locals.page.breadcrumb}"; s.server="#{domain}"; var s_code=s.t(); //--></script>} end end def get_content(page, type) if page.field(type) && !page.field(type).content.blank? CGI.escapeHTML(page.field(type).content) end end end
Version data entries
20 entries across 20 versions & 1 rubygems