Using Ektron PageBuilder to instantiate new SmartForm content - c#

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.
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. 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. But without a way to specify which SmartForm configuration I want to use I see no way to fill in the proper fields.
Can anyone help me understand how this could be done?
note: I am using Ektron 8.0.2, not the current 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.
Final Solution
-- John

I did something similar a LONG time ago - I think we were on v7.66 at the time. This is from like 2007, so it's been a while.
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.
At the time I want to say I had to analyze the SmartForm XML, and set up our content accordingly. 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. I think you can assign the XML of a smartform-based content...
This wasn't an easy thing to do, and there was very little on the Ektron developer site to guide me. 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)

One thing that might help in this endeavor would be Content Types. It's a way of mapping the smartform xml fields to a strongly typed .net object. Ektron has a lot of really helpful info on this topic, and I'm pretty sure this will work in v8.0.2:
Ektron Content Types webinar
"Content Types and SmartForms part II" - 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.
UPDATE:
You might also give this SO post a read: Creating new smartform data using Ektron ContentTypes

Related

NavisWorks API Issue

Has anyone dealt with the Autodesk NavisWorks Manage API before? I have some problems with using this API and I posted on 4 NAvisWorks forums, no one still answered. I also sent an email to the AutoDesk office in Africa but they did not reply. Well here are my problems:
I want to be able to read from a NavisWorks File (.nwd or .nwf) and get required data such as the dimensions of every model in the file, their positions, vertices etc.
to able to change the data (for ex, a rectangle with length 4 and with 5 to a rectange with length 6 and with 2)
to be able to write back the changes to the file and of-course display the changes instantly in the viewer.
I looked at almost every bit of the API documentation but cant seem to see the possibility to achieve what's required (maybe its not possible I am not sure). Any help will be greatly appreciated. Thanks in advance.
P.S. I am working with C#
in API folder where Navisworks is installed, you can find a lot of examples and API documentation.
And the answers:
I believe you can not change geometry, but in order to get it, the best approach is to debug a plugin and investigate what you can get from the object...
Also read this article to understand Navisworks file types.
If you would like to change property value (PropertyCategories), no problem, but again - no way to change geometry. You need to change original file (DWG, ...) and import it in Navisworks once again.
Both of the above.
using Autodesk.Navisworks.Api.Interop.ComApi;
When using this you can access the full geometry of the object and make your amendments here. There are examples of how this is used within the new SDK's. Sadly Navisworks is a read-only application and it would seem impossible to make the changes to the current file. Although you can amend the objects and re-import them.

Custom PropertyGridEditor etc. for web part edit zone?

I want to change the appearance of the default editor parts, and am a little unsure of how to go about doing this, as there seems to be a surprising lack of documentation on the subject.
I've been able to create a custom declarative catalog with some trial and error and overriding the RenderCatalogPart method, and now wish to do something similar with my AppearanceEditor and PropertyGridEditor. I've tried just changing the style of the editor parts using CSS, but they are already arranged into tables which are impossible to get rid of. It's not even possible to just take the class as is, because the classes are sealed. So I'm basically stuck with having to write my own from scratch, I guess the questions are as follows:
1) How do I go about getting the information on the controls I need to render?
2) According to the documentation, I need to override the ApplyChagnes and SyncChanges methods - but I can't find any information on what I actually need to put in these methods.
3) On a similar note, is it possible to change the layout of the EditorPart itself, so that the AppearanceEditor, BehaviourEditor etc. are displayed side-by-side instead of on top of eachother?
4) Is there any way to have the page catalog displayed somewhere on the page, even in browse mode? I'd quite like to use it as a 'minimised' area, where users can send web parts they don't want immediately. At the moment they go back into the page catalog and users tend to just add a new part instead. I know that I can have multiple catalog zones on the page, which is great, but it only shows up in catalog mode.
Any help would be very much appreciated.
I didn't get any replies here, but I was able to figure out a way to do some of these.
In the end I decided to use reflection to get each public property on the web part that was WebBrowsable, and figure out what sort of control to display from the type.
The ApplyChanges() and SyncChanges() methods essentially just persist the changes from the page to the personalization blob and vice-versa. It's a matter of rendering some controls on the page, and mapping the values to the properties of the web part in these methods.
I don't think this is possible without writing your own.
Haven't been able to do this, but I don't imagine that it's possible sadly.

Sharepoint basics and any useful resources?

Sorry about having 3 questions in one but they are closely related and should be simple for someone familiar.
I'm used to coding Java/Obj C/PHP and am finding trying to modify a template somewhat annoying partly because it doesn't make sense but mostly I can't find resources.
I am editing a master template and have gotten the basics but some things still allude me.
With the ContentPlaceHolders, is there a way to use it more than once? Someone posted some code about how you can do this but it said I couldn't use code here.
Is there a way to modify these ContentPlaceHolders without using Sharepoint designer?
I thought using the SharePoint: tag would be a possible way around this, but I can't find any docos on the possible tags and what they do and where to use them.
Thanks for any help.
A ContentPlaceHolder in a master page only maps to one Content section in a page/page layout.
Yes, you can modify the contents of ContentPlaceHolder using code, building a control tree.
The SharePoint tag prefix is used to signify a different control namespace, but there is no sharepoint:placeholder
Maybe if you explain what you are trying to do, we might be able to advise you the best way.

Where to create an RSS feed for dynamic website

I'm currently creating a website a little bit like Digg.com. There are different category like "Technology", "Sports", etc.. I want to create an RSS feeds for my website and while doing research on this, I have question that I can't find the answer.
First, this is what I have:
-I have the .NET code in C# that create a file with the last 15 news from a query from my database.
What I need to know:
-Is the RSS feeds (the xml file) needs to be generated at each load of the page (I saw that on some tutorial page but maybe it was only for a educational purpose). Personaly, I'm thinking about regenerating the .xml file each time someone submit something new. Is this a good idea?
-Do I need to create a different file for each categorie. Example: feedSports.xml, feedTechnology.xml, etc??? Or is there another way (I saw something about channel.???)
-What does feedburner do with all of this?
Thanks a lot for you help. I know this must be very newbie question so that's why I can't find anything answering this clearly on google.
DarkJaf
Your feeds would be generated just as your HTML pages are generated, after each request. But instead of outputting HTML it would be outputting RSS.
I probably would not make a file for each feed but it sure is possible. A better approach may be to pass a variable via GET or POST to your page generating the RSS and grab the data that pertains to the variable passed. You most likely can use the same logic you use for generate your HTML news lists if you isolate your code well.
I would also take a look at the article posted by Raj. It looks like C# has a nice namespace (System.ServiceModel.Syndication) that contains some objects that make the job pretty easy.
Have fun!
Nick
nickgs.com

Generate page dynamically & insert body into another page - is this realistic?

I have the requirement to create a page which contains a graph at the top, and for each item in the graph there's a fact sheet below. I already produce the fact sheets as stand-alone pages. Now, rather than recreating the fact sheet to include in the page I have to create, I'd like to use the work that already exists.
Is it realistic that I dynamically generate each fact sheet as needed, strip out the body and insert that into the new page? If so, does anyone have any pointers or suggestions? Thanks
I would suggest moving the content of the existing page into an ASCX user control - it should be a fairly quick job, and then you can incorporate it into other pages as required.
A quick way to implement this feature would be to use an iframe to load the other pages in to. This would allow you to keep using the work that already exists. Not the most elegant solution but it would work.
Hope this helps.
No, generating stuff you don't need and then removing it is inelegant at best, hackish, and will likely contribute to lowering the quality (including reliability, security etc.) of your code.
Refactor your factsheet page code to generate a header, but use a self-contained class/widget to generate the actual factsheet content. Then just instanciate and use that same class/widget on the other page as well.

Categories

Resources