How to use a .Net web usercontrol for the Metatags
Hello,
In exploring the possibilities of Umbraco we do not succeed in implementing a .Net web usercontrol.
We have a usercontrol with a textbox and a button, that writes the output to a string: the Keywords-metatag. We have made a contentPlaceHolder in the head-section of a MasterPage.
We have followed the instructions as described on http://www.nibble.be/?p=24 and want the output to appear in the content-tag in the page.
We have added our new datatype 'MetaTags' to a tab, but how do we go along from here?
Is it possible to use any .Net usercontrol and have its output, whether a Gridview or plane HTML-code, placed in a ContenPlaceHolder?
Maybe this thread may help you. You don't actually need to create your own datatype, a simple text string property should do fine for this, altho nothing prevents you from using your own datatype. Syntax for using your own property will be identical.
To my knowledge, as long as your user-control is derived from the "umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor" interface - and the content/string/value is available via the "value" property ... yes it should work with the User Control Wrapper data-type.
With that said, I have experienced a few problems with the User Control Wrapper ... and ended up writing a custom data-type, as per one of Nibble's other blog posts - using the "umbraco.cms.businesslogic.datatype.AbstractDataEditor" abstract class.
How to use a .Net web usercontrol for the Metatags
Hello,
In exploring the possibilities of Umbraco we do not succeed in implementing a .Net web usercontrol.
We have a usercontrol with a textbox and a button, that writes the output to a string: the Keywords-metatag. We have made a contentPlaceHolder in the head-section of a MasterPage.
We have followed the instructions as described on http://www.nibble.be/?p=24 and want the output to appear in the content-tag in the page.
We have added our new datatype 'MetaTags' to a tab, but how do we go along from here?
Is it possible to use any .Net usercontrol and have its output, whether a Gridview or plane HTML-code, placed in a ContenPlaceHolder?
Thanks in advance,
Fabian
Hi Fabian,
Maybe this thread may help you. You don't actually need to create your own datatype, a simple text string property should do fine for this, altho nothing prevents you from using your own datatype. Syntax for using your own property will be identical.
Cheers,
/Dirk
Hi Fabian,
To my knowledge, as long as your user-control is derived from the "umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor" interface - and the content/string/value is available via the "value" property ... yes it should work with the User Control Wrapper data-type.
With that said, I have experienced a few problems with the User Control Wrapper ... and ended up writing a custom data-type, as per one of Nibble's other blog posts - using the "umbraco.cms.businesslogic.datatype.AbstractDataEditor" abstract class.
http://www.nibble.be/?p=62
Alternatively, you could consider using the default Tags data-type for your Meta Keywords property?
Good luck, Lee.
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.