cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering a 're-render' of Web Forms content

grumpy_burton
Champ in-the-making
Champ in-the-making
Hi there,

A quick question, is there a way to trigger a re-render of all content in a web project (that is managed by Web Form/XForm)?

i.e. I have a bunch of already entered (or imported XML) and then decide to add Rendering Engine (could be an additional one or even edit an existing one).

Can I trigger alfresco to go an re-render all the content ?

Cheers,
Alex.
13 REPLIES 13

arielb
Champ in-the-making
Champ in-the-making
there is no way to do this yet.  please file a feature request.

grumpy_burton
Champ in-the-making
Champ in-the-making
Raised a feature request:
http://issues.alfresco.com/browse/WCM-413

In meantime, can you think of any work arounds to get the content to render? Can we programmically walk the content tree and re-generate it? or is that interface hidden too deep in the GUI code?

edgar
Champ in-the-making
Champ in-the-making
We have the same issue. What we are doing is the following:
* Create Web Forms for content elements that will be placed on web pages. E.g. a "crosslink menu", a "news item", etc.
* Create a Web Form for the web page. This Web Form has fields like "pagetitle" and has fields of type anyURI so that a content manager can add links to the content items created by the Web Forms for the content elements
* Create a (XSLT) template that renders the web page (the XML created by the page Web Form) and also renders the included content elements.

Now, when any of the included content elements change we need to re-render the page. In the future I hope that Alfresco can take care of this process altogether. In many other web CMS's the included content elements knows that it is included on the page and can automatically trigger a re-render of this page.

For now we see it as a "workaround" that a content manager has to manually re-render the page. We would like to build an automated way of doing this. And indeed possible a re-render of the entire web site (in our case: all web pages).

regards,

Edgar

kvc
Champ in-the-making
Champ in-the-making
Everyone:

Done and done.  We'll add to our investigate list for 2.1.  We will update you all once we've confirmed whether or not this can be fixed for our 2.1 release.

Kevin

edgar
Champ in-the-making
Champ in-the-making
Done and done.

What exactly are you done with Kevin? 😉


We'll add to our investigate list for 2.1.  We will update you all once we've confirmed whether or not this can be fixed for our 2.1 release.

Excellent! Thanks.

But to come back to the earlier question: can you think of a workaround in the meantime? Because of this particular issue we are even in the process of implementing our own rendering process (XSLT stuff) outside of Alfresco (using JSP taglibs) so that we can render for example menu's that need to be updated a lot at runtime (when the JSP is loaded in the web site) instead of "render time" (i.e. within Alfresco).

kvc
Champ in-the-making
Champ in-the-making
Unfortunately not done with anything!  Just a catch phrase to mean, "roger that; on it"

In the meantime, I would recommend building a custom JSP tag that either uses our RMI interface to the AVM or goes off the CIFS mount.  If you put that in your WEB-INF dir in your sandbox, should be able to virtualize and test.

Another suggestion:  generate the menu as a static fragment and use a simple JSP or server-side include (SSIs for HTML pages are virtualizable).

The trick for enabling re-generation is that the contents of a web project first must be indexed for search.  That is a core capability being added for 2.1.0.  So, unfortunately, we have a dependency first that we need to address - but we'll definately look to add.

Kevin

edgar
Champ in-the-making
Champ in-the-making
In the meantime, I would recommend building a custom JSP tag that either uses our RMI interface to the AVM or goes off the CIFS mount. 
[..]
Another suggestion:  generate the menu as a static fragment and use a simple JSP or server-side include (SSIs for HTML pages are virtualizable).
[..]

Funny. We have exactly this discussion here: shall we go for a runtime taglib solution (off the CIFS interface) or for a JSP include solution. Do you think the JSP include solution would be suitable for all content items that are included on a web page (which itself again is a content item)? And not just this menu example.

Say I have a web page on which I load a number of content items such as a news item, a banner and a service menu. All of these three items could be included as JSP snippets by my page template I think. The Web Forms for these content items have their own "component template" attached to them which generates the relevant JSP snippets. A content manager when building the page then selects these JSP snippets to be included (using anyURI elements).

This way the page is assembled of its elements at runtime and you can always be sure that the latest version of the included elements in shown on the page.

The trick for enabling re-generation is that the contents of a web project first must be indexed for search.  That is a core capability being added for 2.1.0.  So, unfortunately, we have a dependency first that we need to address - but we'll definately look to add.

Using the CIFS interface it should not be too hard to write a script that simply re-saves all .XML content files in a Web Project should it? When a content file is re-saved the rendering process for that content item (based on a certain Web Form) is triggered, right? The only problem is: you don't know which content items to re-save, you will touch them all, which is a bit of a shame.

arielb
Champ in-the-making
Champ in-the-making
a save via the cifs mount will unfortunately not trigger a regenerate of renditions, it has to be either an update or edit via the ui.

kvc
Champ in-the-making
Champ in-the-making
Say I have a web page on which I load a number of content items such as a news item, a banner and a service menu. All of these three items could be included as JSP snippets by my page template I think. The Web Forms for these content items have their own "component template" attached to them which generates the relevant JSP snippets. A content manager when building the page then selects these JSP snippets to be included (using anyURI elements).

This way the page is assembled of its elements at runtime and you can always be sure that the latest version of the included elements in shown on the page.

Yes and yes!  This is *exactly* the right approach.  You can then have forms for (a) creating a discrete content item (b) creating a component (a JSP that gets included other web pages, where the form used to create the JSP captures all relevent attributes from an end-user to generate a snippet of dynamic text - for example, having a Most Recent component where the form captures things like # of items to display, sort order, and metadata / content fields to output in display list) and © creating a page (where the form captures from end user which components to use on a page, where to position, etc. - generating a JSP page with all the appropriate includes.

Moving forward, we will be updating our publishing wizard to enable a WYSIWYG presentation for these types of page forms (drag-and-drop component references), where you can launch the underlying forms associated with an individual component for customizing the included item (double-click on a Most Recent component to fill out it's form details).

So, this is exactly the right approach - and makes wonderful use of the virt server to test a dynamic site!  Also, empowers business users to build dynamic web pages - without a developers assistance for creating every single JSP.

Kevin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.