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?
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?
Individual access to Social fields
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?
Cheers,
David
Hi David,
Thought this was in the documentation, but was not, sorry about that.
You can use
To render all social tags.
Hope this helps,
Richard
Hi Richard,
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?Cheers,
David
Hi David,
Underneath it is using SEOChecker.Library.Metadata which has access to all the properties.
Hope this helps,
Richard
is working on a reply...