I really need some help with this and I am not sure where to go. We have fields in our umbraco system where a user can enter metadata and metakeywords. On the first level of templates the keywords and metadata are getting entered fine. As soon as it reaches the products page, its not being entered whatsoever. I have played around with this for a few hours and no luck. I have included the templates below and hope someone can help me.
What version of Umbraco are you using? I think there was a bug in older versions (4.0.3?) where umbraco:Item tags would only work from their direct (child) template and not in inherited masters. In this case you could use an XSLT macro instead to render them instead.
If this isn't the case, do you actually have metadata entered on the Product pages or are you expecting it to pull recursively? Does it pull if you enter something in a Product page?
Thanks For The Quick Reply Tom. I am using umbraco version 4.0.3. On our product page, we have different tabs, one tab is where the user can enter metdata and meta keywords. The data is actually entered on the product pages itself and I need to pull that in
Are you sure you have the metaDescription entered within the correct field names on the Product pages?
You might double check by viewing the raw XML for a product page and verifying there is a <data alias="metaDescription"> tag there that is populated. You can check this by either:
- Check the umbraco.config file and find a product page - Use the XMLDump package to verify this - Create an XSLT macro to dump out the XML from currentPage and insert it into your product template. The XSLT code would just be: <textarea><xsl:copy-of select="$currentPage"/></textarea>
Just looked at the umbraco.config file and the names are still the same, it also looks like the information is being populated in there, but it does not come out in Internet explorer when the view page source is done. Here is what the log says:
Is the content from your MetaData placeholder coming down at all? IE are you seeing the actual Meta tags on product pages and they are just blank? Or if you enter some static content in the template inside the MetaData placeholder do you see it at all on your product pages?
If it is coming down properly and just not rendering the field content, how about trying an XSLT macro instead of the <umbraco:item> tags to render your Meta Tags? Worth a try. Something like:
As you can see its just the empty tag.. Is the XSLT the only way of doing it? Its populating the rest of the site fine until it hits this product level.
You might want to look at the urlRewriting file, the way the products area works is a little different. you might need to do the meta information differently on the product template than the other templates.
I don't think XSLT is the only way of doing it, but it would be a good step for troubleshooting. If it's not working in XSLT you've got some bigger problems :) Plus if it's not working in XSLT you can do copy-of's to see what XML we are getting and help troubleshoot.
Have you tried adding the recursive="true" attribute to see if parent meta data trickles down.. might give you some idea if it's a problem with the template structure or just a problem with the page properties.
Meta Data Not Populating Down
Hi,
I really need some help with this and I am not sure where to go. We have fields in our umbraco system where a user can enter metadata and metakeywords. On the first level of templates the keywords and metadata are getting entered fine. As soon as it reaches the products page, its not being entered whatsoever. I have played around with this for a few hours and no luck. I have included the templates below and hope someone can help me.
Thanks again!
Content Master:
Interior Master:
Product Master: (Metadata not coming down to this level)
Hi,
What version of Umbraco are you using? I think there was a bug in older versions (4.0.3?) where umbraco:Item tags would only work from their direct (child) template and not in inherited masters. In this case you could use an XSLT macro instead to render them instead.
If this isn't the case, do you actually have metadata entered on the Product pages or are you expecting it to pull recursively? Does it pull if you enter something in a Product page?
-Tom
I tried using this code in the product template:
But all this gives me is the empty tag, it does not populate any of the data from the text boxes.. Any help would be greatly appreciated!
Thanks
Thanks For The Quick Reply Tom. I am using umbraco version 4.0.3. On our product page, we have different tabs, one tab is where the user can enter metdata and meta keywords. The data is actually entered on the product pages itself and I need to pull that in
Are you sure you have the metaDescription entered within the correct field names on the Product pages?
You might double check by viewing the raw XML for a product page and verifying there is a <data alias="metaDescription"> tag there that is populated. You can check this by either:
- Check the umbraco.config file and find a product page
- Use the XMLDump package to verify this
- Create an XSLT macro to dump out the XML from currentPage and insert it into your product template. The XSLT code would just be: <textarea><xsl:copy-of select="$currentPage"/></textarea>
-Tom
Hi Tom,
Just looked at the umbraco.config file and the names are still the same, it also looks like the information is being populated in there, but it does not come out in Internet explorer when the view page source is done. Here is what the log says:
Weird.
Is the content from your MetaData placeholder coming down at all? IE are you seeing the actual Meta tags on product pages and they are just blank? Or if you enter some static content in the template inside the MetaData placeholder do you see it at all on your product pages?
If it is coming down properly and just not rendering the field content, how about trying an XSLT macro instead of the <umbraco:item> tags to render your Meta Tags? Worth a try. Something like:
If you want to make them recursive I think you could replace with something like:
-Tom
When I view the source on the page this is what I am getting:
As you can see its just the empty tag.. Is the XSLT the only way of doing it? Its populating the rest of the site fine until it hits this product level.
Vince,
In the product page in Umbraco is there a field with an alias of metaDescription?
Yes there is. It works for every section except the product pages
You might want to look at the urlRewriting file, the way the products area works is a little different. you might need to do the meta information differently on the product template than the other templates.
-Sean
I don't think XSLT is the only way of doing it, but it would be a good step for troubleshooting. If it's not working in XSLT you've got some bigger problems :) Plus if it's not working in XSLT you can do copy-of's to see what XML we are getting and help troubleshoot.
Have you tried adding the recursive="true" attribute to see if parent meta data trickles down.. might give you some idea if it's a problem with the template structure or just a problem with the page properties.
is working on a reply...