Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have some custom routing, as per: https://our.umbraco.com/documentation/reference/routing/custom-routes
IPublishedContentWrapped is used to mix a genuine IPublishedContent item with external data.
When I output the social tags (using .SocialTags) the canoncial url renders the url of the genuine IPublishedContent item instead of the url that was request in my custom route. I don't want this, as this url will not return anything.
I don't necessarily expect to be able to setup SEOChecker to pull through my custom url automatically, but it would be good to be able to access all the data that .SocialTags uses to provide my own implementation of the tags rendered.
How can I access things like the Twitter user name, and the FacebookTitle, from the view?
Thought this was in the documentation, but was not, sorry about that.
You can use
var meta = Model.Content.GetPropertyValue<SEOChecker.MVC.MetaData>("seoChecker");
To render all social tags.
Hope this helps,
That is in the docs I've seen. The problem is that the og:url is wrong for my custom routes. For now I've stripped it out through .IndexOf() but that feels a bit hacky. Is there no other way to access the social data in the view?
Underneath it is using SEOChecker.Library.Metadata which has access to all the properties.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted