简体   繁体   English

使用Ektron PageBuilder实例化新的SmartForm内容

[英]Using Ektron PageBuilder to instantiate new SmartForm content

I'm attempting to create a page that will take in given information from a form and create a new SmartForm in a given folder with a specific Template and SmartForm configuration. 我正在尝试创建一个页面,该页面将从表单中获取给定信息,并在具有特定模板和SmartForm配置的给定文件夹中创建新的SmartForm。

The issue is that I have no clue how this could be accomplished. 问题是我不知道如何实现这一目标。 The closest information I could find was the code snippet give here: https://developer.ektron.com/Templates/CodeLibraryDetail.aspx?id=509&blogid=116 but from what I can see this doesn't associate the created content with a specific SmartForm configuration, just a title, folder, template, language, alias, summery, and metadata. 我能找到的最接近的信息是代码片段: https : //developer.ektron.com/Templates/CodeLibraryDetail.aspx?id=509&blogid=116但是从我看到的内容来看,这并没有将创建的内容与特定的SmartForm配置,只是标题,文件夹,模板,语言,别名,夏季和元数据。 Am I just not understanding what I'm seeing here? 我只是不明白我在这里看到了什么?

Once I understand how to instantiate a new SmartForm it shouldn't be any trouble to populate the fields given a properly made input form. 一旦我了解了如何实例化一个新的SmartForm,在给定正确输入表单的情况下填充字段应该没有任何问题。 But without a way to specify which SmartForm configuration I want to use I see no way to fill in the proper fields. 但是没有办法指定我想要使用哪个SmartForm配置,我看不到填写正确字段的方法。

Can anyone help me understand how this could be done? 任何人都可以帮我理解如何做到这一点?

note: I am using Ektron 8.0.2, not the current 9.* 注意:我使用的是Ektron 8.0.2,而不是目前的9. *

UPDATE: 更新:

So I finally came up with a solution and it's a bit long winded for this page so I'm redirecting to a formerly useless blog of mine. 所以我终于提出了一个解决方案,这个页面有点长篇大论,所以我将重定向到我以前无用的博客。 If there is demand that I put it here I will do what I can to move the final solution I came up with to this page. 如果有需求我把它放在这里,我会尽我所能将我提出的最终解决方案移到这个页面。

I should also note that in the end, PageBuilder was not used in any way. 我还应该注意到,最后,PageBuilder没有以任何方式使用。

Final Solution 最终解决方案

-- John - 约翰

I did something similar a LONG time ago - I think we were on v7.66 at the time. 我在很久以前做过类似的事情 - 我想我们当时是在v7.66。 This is from like 2007, so it's been a while. 这是来自2007年,所以它已经有一段时间了。

My app took Word documents as input, reformatted the content of a table (specifically laid out by our writers), and imported it into the Ektron system as SmartForm content. 我的应用程序将Word文档作为输入,重新格式化表格的内容(由我们的作者专门布置),并将其作为SmartForm内容导入Ektron系统。

At the time I want to say I had to analyze the SmartForm XML, and set up our content accordingly. 当时我想说我必须分析SmartForm XML,并相应地设置我们的内容。 There may have been better ways to do this, but we had a really aggressive deadline and I just needed to get the content into the CMS as fast as possible. 可能有更好的方法来做到这一点,但我们有一个非常激进的截止日期,我只需要尽快将内容放入CMS。 I think you can assign the XML of a smartform-based content... 我想你可以分配一个基于smartform的内容的XML ...

This wasn't an easy thing to do, and there was very little on the Ektron developer site to guide me. 这不是一件容易的事情,Ektron开发者网站上很少有人指导我。 I want to say it was a matter of creating a content in the folder, which had the smart form attached to it. 我想说这是在文件夹中创建内容的问题,该内容附有智能表单。 (It's been a while and my Ektron fu is a little rusty) (已经有一段时间了,我的Ektron fu有点生锈)

One thing that might help in this endeavor would be Content Types . 可能有助于这项工作的一件事是Content Types It's a way of mapping the smartform xml fields to a strongly typed .net object. 这是一种将smartform xml字段映射到强类型.net对象的方法。 Ektron has a lot of really helpful info on this topic, and I'm pretty sure this will work in v8.0.2: Ektron有很多关于这个主题的非常有用的信息,我很确定这将在v8.0.2中有效:

Ektron Content Types webinar Ektron内容类型网络研讨会

"Content Types and SmartForms part II" - Ektron DevCenter Forum Post “内容类型和SmartForms第二部分” - Ektron DevCenter Forum Post

The ContentManager class was one of (if not the) first Framework API class introduced, so there's a good chance it would work for you. ContentManager类是(如果不是)第一个引入的Framework API类之一,因此它很有可能适合您。

UPDATE: You might also give this SO post a read: Creating new smartform data using Ektron ContentTypes 更新:您也可以给这篇SO帖子读一读: 使用Ektron ContentTypes创建新的smartform数据

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

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