#
dagda1
Hi,
I am trying to put together a preview implementation for a site we are using Cuyahoga for the CMS framework and was looking for some words of wisdom from the wise.
We are only really using about 3 modules with the two most people will be familiar with are the StaticHtml and the article modules.
The worry here and what I am trying to avoid is creating individual preview functionality for each module. I noticed on the wiki that there are plans to have all content implement an IContentItem interface and in turn a ContentItem base class. I don’t think this will help my cause with a need to treat all content generically.
I had a play and was able to preview the StaticHtml content by first placing the unsaved content in the Web Cache and then opening a new window with a page that inherited from PageEngine which inserted the cached content into the correct place in the Controls collection.
This is fair enough for StaticHtml but having to do this for every Module is less than desirable.
My new opinions are this and I guess this sort of ties in with workflow:
1. Clone a new node and save the changes to the preview node and not the actual node. I am favouring this approach but I am unsure of how to tie the actual node to the preview node. Also I don’t want to get into the situation where I could have multiple nodes in the db that were created by previewing and might come back in the search etc. or worse start appearing in the Navigation. I can’t guarantee when the user will exit the application so there is now way of deleting this preview node. This way would lead nicely to workflow and I guess versioning of nodes. It would be nice to browse a future version of the site.
2. I could clone a new node and somehow keep it in memory and have a class like PageEngine that retrieves the in memory state of the page and then renders it as per normal. This is probably the path of least resistance but as we are using proxies on most persistence classes, we cannot serialise them by normal means (that I know of) so again I am a bit confused of how to go about this.
Any thoughts at all are greatly appreciated.
Paul
I am trying to put together a preview implementation for a site we are using Cuyahoga for the CMS framework and was looking for some words of wisdom from the wise.
We are only really using about 3 modules with the two most people will be familiar with are the StaticHtml and the article modules.
The worry here and what I am trying to avoid is creating individual preview functionality for each module. I noticed on the wiki that there are plans to have all content implement an IContentItem interface and in turn a ContentItem base class. I don’t think this will help my cause with a need to treat all content generically.
I had a play and was able to preview the StaticHtml content by first placing the unsaved content in the Web Cache and then opening a new window with a page that inherited from PageEngine which inserted the cached content into the correct place in the Controls collection.
This is fair enough for StaticHtml but having to do this for every Module is less than desirable.
My new opinions are this and I guess this sort of ties in with workflow:
1. Clone a new node and save the changes to the preview node and not the actual node. I am favouring this approach but I am unsure of how to tie the actual node to the preview node. Also I don’t want to get into the situation where I could have multiple nodes in the db that were created by previewing and might come back in the search etc. or worse start appearing in the Navigation. I can’t guarantee when the user will exit the application so there is now way of deleting this preview node. This way would lead nicely to workflow and I guess versioning of nodes. It would be nice to browse a future version of the site.
2. I could clone a new node and somehow keep it in memory and have a class like PageEngine that retrieves the in memory state of the page and then renders it as per normal. This is probably the path of least resistance but as we are using proxies on most persistence classes, we cannot serialise them by normal means (that I know of) so again I am a bit confused of how to go about this.
Any thoughts at all are greatly appreciated.
Paul