简体   繁体   English

在Ektron中实现JSon-LD Schema,这可能吗?

[英]Implementing JSon-LD Schema in Ektron, is it possible?

This is my first time using Ektron and i'm trying to implement Json-LD schema scripts for each page. 这是我第一次使用Ektron,我正在尝试为每个页面实现Json-LD模式脚本。 I have 68 scripts that I need to implement that are unique for each page. 我需要实现68个脚本,这些脚本对于每个页面都是唯一的。

I thought I would be able to implement these scripts through meta data, but now i'm unsure. 我以为我可以通过元数据实现这些脚本,但是现在我不确定。 Each script is over 1000 characters, the html and meta tag types only allow 500 characters, so i'm assuming i'm in the wrong place. 每个脚本超过1000个字符,html和meta标记类型仅允许500个字符,因此我假设我在错误的位置。 If anyone could shed some light it would be much appreciated. 如果有人能阐明一点,将不胜感激。

Ektron's metadata isn't intended for large chunks of data / content. Ektron的元数据不适用于大块数据/内容。 So, yes, you will find limits there. 因此,是的,您将在那里发现限制。

Here are two things you might try as workarounds. 您可以尝试以下两种方法来解决。

Most direct: 最直接:

Use the Ektron Library. 使用Ektron库。 Go to the Library tab and click on the Root node and view Properties. 转到“库”选项卡,然后单击“根”节点并查看“属性”。 Add an extension to allow you to upload your JSON-LD as a file. 添加扩展名以允许您将JSON-LD作为文件上传。 Use metadata on the content item to reference the uploaded file. 使用内容项上的元数据引用上载的文件。 Combine the two upon output. 在输出时将两者合并。

If you want the JSON-LD to be editable within the CMS... 如果您希望JSON-LD在CMS中可编辑...

Gaming the platform a bit 游戏平台有点

Create a new SmartForm definition and include in it a single plain-text, multi-line field (not Rich text). 创建一个新的SmartForm定义,并在其中包含一个纯文本,多行字段(非RTF)。 This should hold your JSON-LD. 这应该包含您的JSON-LD。 Set up a folder and, if your version supports it (you didn't specify CMS version, so I will assume relatively recent), set the folder to be non-searchable so these things don't come up in site search results. 设置一个文件夹,如果您的版本支持该文件夹(您未指定CMS版本,因此我认为是相对较新的),则将该文件夹设置为不可搜索,以便这些内容不会出现在网站搜索结果中。 Add a restriction to the folder to only allow the Smart Form definition you just created. 在文件夹中添加一个限制,以仅允许您刚刚创建的智能表单定义。 Create your JSON-LD there using the plain-text field. 使用纯文本字段在此处创建JSON-LD。 You should be able to store up to 1MB. 您应该最多可以存储1MB。

Same as above, add your JSON-LD as text then use a reference to this item from the content you want to use it. 与上述相同,将JSON-LD添加为文本,然后使用要使用的内容中对此项目的引用。

The metadata in this case (and possibly the library one, though I'd have to test and I don't have an Ektron environment for development anymore) will give you the Content ID for the object holding your JSON-LD. 在这种情况下,元数据(可能还有一个库,尽管我必须进行测试并且不再具有Ektron环境进行开发)会为您提供持有JSON-LD的对象的Content ID。 You'll have to make another API call but will give you the solution you appear to want from above. 您将不得不进行另一个API调用,但是会从上面提供您似乎想要的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM