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
Hey all,
I'm hoping this is a simple question for you smart lot out there. I'm implementing Google Schema's (https://developers.google.com/schemas/formats/json-ld) into a clients site using the JSON route.
<script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "name" : "[organization name]", "logo" : "[logo image url]", "url" : "[website url]", "sameAs" : [ "https://twitter.com/[username]", "https://www.facebook.com/[username]", "https://www.linkedin.com/company/[username]", "https://plus.google.com/[username]/posts" ] } </script>
When I've tried to implement this I get the following error message:
The name 'context' does not exist in the current context
Any help would be greatly appreciated.
A guess but is this placed somewhere in Razor view or layout where the @ symbol has special meaning so it is trying to treat 'context' as a variable? If so it might need escaping so I believe @ becomes @@. Sorry if I'm way off.
Ian you was spot on escaping it with double @ worked. I was trying to escape it with .
Working with to much JS lol.
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.
Continue discussion
Using Google Schema's creates an error on page
Hey all,
I'm hoping this is a simple question for you smart lot out there. I'm implementing Google Schema's (https://developers.google.com/schemas/formats/json-ld) into a clients site using the JSON route.
When I've tried to implement this I get the following error message:
Any help would be greatly appreciated.
A guess but is this placed somewhere in Razor view or layout where the @ symbol has special meaning so it is trying to treat 'context' as a variable? If so it might need escaping so I believe @ becomes @@. Sorry if I'm way off.
Ian you was spot on escaping it with double @ worked. I was trying to escape it with .
Working with to much JS lol.
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.