<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to evaluate cms with parameter on xhtml</title><link>https://answers.axonivy.com/questions/1964/how-to-evaluate-cms-with-parameter-on-xhtml</link><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;I'm using jsf in ivy and normally i use directly API from ivy to get cms in xhtml file, ex:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;p:outputLabel value="#{ivy.cms.co('/ch/axonivy/Label/EntityStep/Contact/email')}"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;now in my cms, it has placeholder like &lt;strong&gt;Input email ex {0}&lt;/strong&gt; {0} will be replaced by param and i can do it easily on ivy script/java (using API from ivy)
but i can't use that api on xhtml page&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;p:outputLabel value="#{ivy.cms.co('/ch/axonivy/Label/EntityStep/Contact/email', 'someone@google.com')}"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Does anyone know?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1964/how-to-evaluate-cms-with-parameter-on-xhtml" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 16 Aug 2016 11:34:02 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1964/how-to-evaluate-cms-with-parameter-on-xhtml/1965</link><description>&lt;p&gt;I think it should be possible to write your own managed bean:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@ManagedBean("cmsHelper")
public class CmsHelper{
  public String getCo(String uri, String param){
     return Ivy.cms().co(uri, param);
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and access it like any other managed bean:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;p:outputLabel value="#{cmsHelper.co('/ch/axonivy/Label/EntityStep/Contact/email', 'someone@google.com')}"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 16 Aug 2016 11:34:02 -0400</pubDate><guid>https://answers.axonivy.com/questions/1964/how-to-evaluate-cms-with-parameter-on-xhtml/1965</guid></item></channel></rss>