Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Trying to get meta tags in on pages but having problems with <head id="head" runat="server"> messing around on Umbraco 4.0.3
In the master template I have the following:
<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head id="head" runat="server"><title><umbraco:Item field="pageName" runat="server"></umbraco:Item></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="google-site-verification" content="" /><meta name="description" content='<umbraco:Item field="Metadata-Description" runat="server"></umbraco:Item>' /><meta name="keywords" content='<umbraco:Item field="Metadata-Keywords" runat="server"></umbraco:Item>' /><link href="/css/style.css" rel="stylesheet" type="text/css" />
But when I view the page I get the following come through:
<head id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_head"><title> Ross Young Fitness</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="google-site-verification" content="" /><meta name="description" content="<umbraco:Item field="Metadata-Description" runat="server"></umbraco:Item>" /><meta name="keywords" content="<umbraco:Item field="Metadata-Keywords" runat="server"></umbraco:Item>" /><link href="/css/style.css" rel="stylesheet" type="text/css" />
obvously this is a problem
<umbraco:Item field="Metadata-Description" runat="server"><
where I should be seing my Keywords, any advice greatly appreciated.
Thanks
Kev
I had the same problem once and the suggestion was: make a macro that takes the itemfields as a parameter and use that one.
call macro:
umbraco:Macro keywords="[$"Metadata-Keywords]" description="[$Metadata-Description]" Alias="metaInformation" runat="server" />
macro:
<xsl:variable name="keywords" select="/macro/keywords-parameter"/><xsl:variable name="description" select="/macro/description-parameter"/><xsl:template match="/"> <meta name="keywords" content="{$keywords}" /> <meta name="description" content="{$description}" /></xsl:template>
Kevin,
head runat server will mess up see issue i had guess this needs to be added as issue on codeplex.
Regards
Ismail
What are you doing to the head in your .net code to need to have runat server in there? Strip it out if you don't need it.
Is being used for runway drop down nav which actually isnt working anyway!
so might take it out
Runway sucks, use one of the navigation macros instead, much better :)
Has this bug already been solved? Creating a macro works, but it should work without using a macro of course.
Jeroen
Agreed. How do we get this fixed?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Meta Tags under <head id="head" runat="server">
Trying to get meta tags in on pages but having problems with <head id="head" runat="server"> messing around on Umbraco 4.0.3
In the master template I have the following:
But when I view the page I get the following come through:
obvously this is a problem
<umbraco:Item field="Metadata-Description" runat="server"><
where I should be seing my Keywords, any advice greatly appreciated.
Thanks
Kev
I had the same problem once and the suggestion was: make a macro that takes the itemfields as a parameter and use that one.
call macro:
macro:
Kevin,
head runat server will mess up see issue i had guess this needs to be added as issue on codeplex.
Regards
Ismail
What are you doing to the head in your .net code to need to have runat server in there? Strip it out if you don't need it.
Is being used for runway drop down nav which actually isnt working anyway!
so might take it out
Runway sucks, use one of the navigation macros instead, much better :)
Has this bug already been solved? Creating a macro works, but it should work without using a macro of course.
Jeroen
Agreed. How do we get this fixed?
is working on a reply...