1) Add the macro to your master template in the <HEAD> section 2) Add the following to all your page document type's (or inherit from one generic doctype)
title | text field description | multi-line text keywords | multi-line text
So for each documenttype you need to add the title, description and keywords.
In the masterpage, in the head-section. Please make sure your field on the documenttypes matches the field "metaDescription" or edit the field so it matches. It should work, as far as I know.
I don't think there's any noticeable performance benefit in the xslt but it's a much nicer/cleaner solution. And when you've created that one "perfect" SEO-XSLT you could re-use it for all your new sites. I've one with title-tag, meta keywords, meta description and no-index (true/false) and I've used it for many sites.
Please remember to mark the right answer as the solution to your problem. :-)
Getting data into the Meta Data fields
Ah sry, didn't see it was a comment to a package. :-/
I'm not sure that I'm following you. I need to give the user access to change this text. Do I need to create custom fields for each page?
Yes, it looks like you do:
1) Add the macro to your master template in the <HEAD> section
2) Add the following to all your page document type's (or inherit from one generic doctype)
title | text field
description | multi-line text
keywords | multi-line text
So for each documenttype you need to add the title, description and keywords.
Usually I create a master doctype with all of the SEO-properties, which basically most of my doctypes inherit from.
Ok. Thanks for the tips. I will give it a go.
Sean
Hi there,
It's not working i'm afraid. I have added the macro and that worked fine but there is no data from the fields coming through.
I added a generic property for each and it's not working. The fields are in the document but the text I have added is not coming through.
title | text field
description | multi-line text
keywords | multi-line text
Hi Sean,
I've just taken a look at the package and it looks like it's based on the old XML schema. You're probably running Umbraco 4.5+, right? :)
Yes I am. Do I need to do something like this instead?
<meta name="description" content='<umbraco:Item field="metaDescription" recursive="true" runat="server" />'>
<meta name="keywords" content='<umbraco:Item field="metaKeywords" recursive="true" runat="server" />'>
Yearh, that could be one solution, if you don't want to try some XSLT... :)
So could I use that you posted above? Would I put this into the master template? In the same spot?
In the masterpage, in the head-section. Please make sure your field on the documenttypes matches the field "metaDescription" or edit the field so it matches. It should work, as far as I know.
Wow. That worked like a treat. Thank you.
Is there any performance benefit to using xslt?
Once again. I really appreciate the help you gave me. Now I can get some sleep.
I don't think there's any noticeable performance benefit in the xslt but it's a much nicer/cleaner solution. And when you've created that one "perfect" SEO-XSLT you could re-use it for all your new sites. I've one with title-tag, meta keywords, meta description and no-index (true/false) and I've used it for many sites.
Please remember to mark the right answer as the solution to your problem. :-)
For anyone else reading this post. I managed to accomplish the task of displaying meta data using the following methods.
1. referencing the metadata fields in the master page like:
<meta name="description" content='<umbraco:Item field="metaDescription" recursive="true" runat="server" />'>
<meta name="keywords" content='<umbraco:Item field="metaKeywords" recursive="true" runat="server" />'>
or using XSLT like this:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.