Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joe 21 posts 41 karma points
    Feb 17, 2011 @ 21:58
    Joe
    0

    Metadata from Master Template Only - Why?

    Hi,

    The meta keywords and description for all pages on my site are inherited from the Master Template. Titles are working fine.

    Why is this?  I know this has to be hurting my SEO performance.

    Thanks!

    _Joe

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 17, 2011 @ 22:06
    Jan Skovgaard
    0

    Hi Joe

    How do you render the fields?

    Are you using umbraco:Item in the template or are you using a XSLT macro for instance?

    Could you perhaps post a snippet of your master template?

    This can be because you're using the value from the nearest ancestor with a value, which will be used if the current page does contain empty keyword and description fields.

    So please share a bit of your code and then it will be more easy to help you out :-)

    /Jan

  • Joe 21 posts 41 karma points
    Feb 17, 2011 @ 22:09
    Joe
    0
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 17, 2011 @ 22:21
    Jan Skovgaard
    0

    Hi Joe

    Ok, I think this one is a bit obvious. The values for the two meta tags are hardcoded, so it makes sense that these are displayed on everyone of your pages.

    If you look at the <title> tag, inside it there is an umbraco:Item tag <umbraco:Item field="title" textIfEmpty="The Motion Monitor - The Total Solution in Motion Capture" runat="server"></umbraco:Item>

    What it does is to fetch the value from the "title" field on your document type. If it's empty it inserts a hardcoded string instead.

    So I suppoe you have some fields for keywords and description, which you could fetch using an umbraco:Item tag...for instance like this

        <meta name="description" content="<umbraco:Item field="description" textIfEmpty="Somehardcodedvalueiffieldisempty" runat="server"></umbraco:Item>" />

    Does this make sense to you? :-)

    /Jan

  • Joe 21 posts 41 karma points
    Feb 18, 2011 @ 17:22
    Joe
    0
  • Joe 21 posts 41 karma points
    Feb 18, 2011 @ 17:28
    Joe
    0
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 18, 2011 @ 19:25
    Jan Skovgaard
    0

    Hi Joe

    That's probably becaue the fields you're trying to get the keywords and description from is falling back to the "ifEmpty" text. Are you sure that

    1) The fields exists?

    2) If they do - has there been entered some text into them?

    Hope this helps.

    /Jan

  • Joe 21 posts 41 karma points
    Feb 19, 2011 @ 00:57
    Joe
    0
  • Josh Reid 182 posts 258 karma points
    Feb 19, 2011 @ 02:33
    Josh Reid
    1

    Hi Joe,

    Ideally if you are outputting a <umbraco:Item /> inside html attributes with double quotes then you would use single quotes around the attributes within the <umbraco:Item />

    I suppose you've entered content into these fields on the content node/s and republished the node as well as republished enitre site - this should refresh the output to show any new values you've entered and published.

    Cheers
    J

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 19, 2011 @ 07:44
    Jan Skovgaard
    0

    Hi Joe

    Yeah, that fields to exist on your document type. But have you entered text into the nodes in your content tree then? If there is content in them then try to publish all the nodes again and finish off by updating the XML chache by right clicking the "Content" node under, which all root nodes are created, and choose "Republish entire site". Now visit your site in the browser and see if the content is being showed in description and keywords.

    @Josh: The content actually renders just fine when one is using the <umbraco:item> with double quotes. If this was the problem the ifEmpty text would not have been written in the HTML source. I'm doing the exact same thing on a site of my own and the content is being fetched just fine. So it's possible to do double quotes within double quotes apparently...:-) But I do understand your concern :-)

    /Jan

  • Joe 21 posts 41 karma points
    Feb 22, 2011 @ 17:01
    Joe
    0
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 22, 2011 @ 20:38
    Jan Skovgaard
    0

    Hi Joe

    How does the fields look like in your content? Have you populated them with any text?

    And have you double checked that the casing for the "keywords" and "description" alias is correct? (According to your screendump it must be referenced in lowercase).

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft