Yes this can be done just by creating a Field in your Doc Type with Textbox Multiple under and then just call it in your template. But at some level i think its better to give only meta kyewords and Description editable.
When you say end-user, do you mean a content-editor?
If so, then yes absolutely! Create a couple of extra properties on your document type for the meta tags (call them something like "metaKeywords" and "metaDescription") - then reference those in your templates.
I use the following code snippet in my master template:
Yes, you should just put the umbraco item´s it in the header section. Asa complement towhatLeesays.Anotherpossibility is to createanXSLTfilefor example bynamemetaTags.xslt. And get the values via XSLT. I have used both methods. Don´t know if the one solution is better than the other.
The way you could test it, is to put some text into the metaDescription and metaKeywords fields on document type, and then view the source code of the page to check if it getsprinted.
The reason why this old solution not works for you is that, it´s for websites that running in WebForms mode. Since you are using Umbraco 7.2.2, it uses MVC as default,
Meta Tags
Hi,
is it possible to creat editable meta tags?
in other words, let the end user change these when they want?
thanks
Hi Dominic,
Yes this can be done just by creating a Field in your Doc Type with Textbox Multiple under and then just call it in your template. But at some level i think its better to give only meta kyewords and Description editable.
//Fuji
Hi Dominic,
When you say end-user, do you mean a content-editor?
If so, then yes absolutely! Create a couple of extra properties on your document type for the meta tags (call them something like "metaKeywords" and "metaDescription") - then reference those in your templates.
I use the following code snippet in my master template:
Cheers, Lee.
thanks, i made the fields in the doc types already, was just wondering about the rest lol
i'll try this, thanks
sorry, do i put this into the head section?
Yes, <meta> tags go inside the <head>.
Hi, Dominic,
Yes, you should just put the umbraco item´s it in the header section. As a complement to what Lee says. Another possibility is to create an XSLT file for example by name metaTags.xslt. And get the values via XSLT. I have used both methods. Don´t know if the one solution is better than the other.
/Dennis
thanks all.
i've gone with Lee's solution
as a total noob tho, i am not sure how to test if this is doing what its meant to be doing
The way you could test it, is to put some text into the metaDescription and metaKeywords fields on document type, and then view the source code of the page to check if it gets printed.
/Dennis
Try Lees' solution and just add some text from you content node then view the source code generated by your browser.
//fuji
as i am reading your replies i am slapping myself.
makes perfect sense lol
thanks again
Hi,
I just tried this solution in Umbraco 7.2.2 and it doesn't work.
Please can anyone tell me how to do this now?
I also tried an old extension built in 2010 but that doesn't work either...
Thanks in advance
Hi Andy,
The reason why this old solution not works for you is that, it´s for websites that running in WebForms mode. Since you are using Umbraco 7.2.2, it uses MVC as default,
In MVC templates you can called it like this.
https://our.umbraco.org/Documentation/Reference/Mvc/views#RenderingafieldwithUmbracoHelper
So for the meta description, and meta keywords it would look like this.
Hope this helps,
/Dennis
Hi Dennis,
That works perfectly. Thank you :)
is working on a reply...