This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Feb 18, 2011, 2:15 PM
40 Posts

Re: How to Create Design from dynamic content

  • Category: Extension Library
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: Dynamic Design
  • Replies: 14
 I think you will want to take a look at the xp:include control.  It allows you to dynamically include the entire contents of another XPage into the current XPage.
Feb 18, 2011, 2:39 PM
23 Posts
Re: How to Create Design from dynamic content
I did look at the xp:include but I don't see how it can do what i need...  
if the content in the config document is
 
<div>
<div>
<xp:include pageName="nav1.xsp"}' id="nav1"></xp:include>
</div>
<div>
<span><xp:include pageName="pagetitle.xsp"}' id="pagetitle"></xp:include></span>
<div>
<span><xp:include pageName="pagecontent.xsp"}' id="pagecontent"></xp:include></span>
</div>
</div>
</div>
 
how do I get that into the xpage so that it will render the includes?  I don't think this will work.


Feb 18, 2011, 2:53 PM
40 Posts
Re: How to Create Design from dynamic content
Then maybe I need a better understanding of what you are trying to accomplish.  Are you trying to give the user the ability to include xp tags on a page, or is it straight HTML? Or do you have predefined blocks of content that you want to dynamically include on the page depending on whether or not they have selected the control for display?  Please explain.
Feb 18, 2011, 3:09 PM
23 Posts
Re: How to Create Design from dynamic content
I am working on a content management system that will support user configurable "skins".  The admin side is going to be all oneuiv2 but the end user site needs to display based on html templates the content managers create.  The HTML template will be stored in a skin document  and will include all of the mark up that will display between the body tags.  The HTML template will need some way of saying "insert the left nav here and display it as a list" or "insert content text here"
 
 
Feb 18, 2011, 6:37 PM
40 Posts
Re: How to Create Design from dynamic content
 Could you then not use an xp:text tag with escape="false" and set the value to the html tags in the value like value="#{configDocument.leftNavFieldName}" (assuming the markup is stored in a field)...
Feb 19, 2011, 1:39 AM
23 Posts
Re: How to Create Design from dynamic content
Yeah, I tried that it just renders <xp:include pageName='testing.xsp'></xp:include> in the browser...
 
 
Feb 19, 2011, 2:26 PM
40 Posts
Re: How to Create Design from dynamic content
You can only use the xp:text to render HTML, not to inject XPages xp:tags into the source XML.  Remember that the XML "source" you place into the source pane of the XPage is interpreted and converted into a .java file, then compiled to a .class for execution on the server at design time. The XML tree is not re-parsed at run time. If you have finalized HTML, then you can use the xp:text...
 
You are going to have to "preplan" where you want to dynamically include content, then place the xp:include tags where you want to include content, then compute the which page to load at run time.  You can use the rendered and loaded attributes of the xp:include tag to turn on or off the rendering of a specific xp:include as well.  

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal