cancel
Showing results for 
Search instead for 
Did you mean: 

Moving content items

lhanna
Champ in-the-making
Champ in-the-making
Hi,

In reference to the WCM Evaluation Example, I am trying to move one of the press releases that I created to a newly created directory under /ROOT/media/releases/content called special releases. So I moved the press release.xml file, the press release.html file and the press release.txt file to this special releases directory. The problem is every time I edit that file, it get s saved back to /ROOT/media/releases/content because the template is configured to place html pages rendered there. So what happens every time I decide to move an item to a special sub directory, do I have to make a special press release web form and create content based on that form? This process is unnecessary given the content follows the same authoring and presentation rules, I just want to place it in a different directory.
Any help would be greatly appreciated.


Thanks,
Lilian
1 REPLY 1

kvc
Champ in-the-making
Champ in-the-making
Lilian:


Great question … and thankfully no.

Your output path can be dependent on an element value captured within your XSD.  You can add, for example, a new element to your form to allow the user to select what directory they want to save an XML in.  This xs:anyURI element can use folder_restriction appearance option defined in web-client-config-wcm.xml.  For your element, you can set that value to a default value in your form, or you can include via reference and a dynamic in-line JSP callout - which would give you the option of providing some users with a default value (a suggestion) and other users a fixed value (read-only, non-modifiable).  The in-line callout could also return a simple enumerated list for a drop-down or radio-button select option if you prefer not giving a folder picker to your end-users.

On a more advanced note, you can define the folder element in a separate XSD that you explicit include (as either an XSD or JSP noted above) to enable reuse across common forms that need flexibility in output location.  You can also define a generic abstract page type that each form you create for a page can import and make a specific defined instance of.

In your output path, you can reference any xml node as you normally would in Freemarker.  There is a tooltip next to the output path with some guidance and more info on the wiki.


Kevin