In one of my projects I would like to find a way of automatically creating title tags for some documents. However por SEO purposes I would like them to be slighty different for every subpage. Is there any way to achive that?
Thanks a lot Mike, I am not really sure how to use your script :(
I figured out a bit different solution. I am planning to create a few macros with different descriptions or titles and then pull them by using one of the properties of my documents. I struggle a bit with it as I cannot directly pass value from property to macro. When I do:
With regards to using the above script... you need to build a class library in Visual Studio, generate the dll and simply place in your bin folder on your site.
with regards to your workaround... I think you probably need your macro to to ask for the titleNumber in the macro script and then you can use the inbuilt
how to automatically create different title tags
Hello guys,
In one of my projects I would like to find a way of automatically creating title tags for some documents. However por SEO purposes I would like them to be slighty different for every subpage. Is there any way to achive that?
thanks in advance!
you can leverage the umbraco event handler framework... on create automatically populate the title param...
Thanks a lot Mike, I am not really sure how to use your script :(
I figured out a bit different solution. I am planning to create a few macros with different descriptions or titles and then pull them by using one of the properties of my documents. I struggle a bit with it as I cannot directly pass value from property to macro. When I do:
<umbraco:Macro Alias="<umbraco:Item field="titleNumber" runat="server" />" runat="server"></umbraco:Macro>
although in html I can see that value has been passed it do not actually pull the macro...
Any way to do that?
With regards to using the above script... you need to build a class library in Visual Studio, generate the dll and simply place in your bin folder on your site.
with regards to your workaround... I think you probably need your macro to to ask for the titleNumber in the macro script and then you can use the inbuilt
umbraco.library:RenderMacroContent()
http://our.umbraco.org/wiki/reference/umbracolibrary/rendermacrocontent
Thanks a lot for your tips Mike! I realized how little I know and spent a few last days changing this :)
Got a bit distructed in the process but I am making a good headway and will try to sort this problem out soon.
is working on a reply...