Jahia Dev Forum > Custom search -...

0 (0 Good)
0 (0 Bad)

Custom search - node property choice list - translation

by  dott_matte »  2013/03/26 08:53

Hi all,

I implemented a new custom search with a filter on a property of my custom FAQ node. The definitions are follows:

 

[jnt:newFAQ] > jnt:content, jmix:editorialContent, mix:title, jmix:structuredContent
 - question (string) i18n
 - answer   (string, richtext) i18n
 - type     (string, choicelist[resourceBundle]) < type1,type2,type3
 
[jnt:customSearchByType] > jnt:content, jmix:structuredContent
- result (weakreference, picker[type="page"]) < jnt:page
- nodeType (string,choicelist[nodetypes=nt:base,resourceBundle]) indexed=no mandatory
 
and here the implementation:
 <s:form method="get" action="${searchUrl}" class="frm">
        [...]
        <s:nodeProperty name="type" id="searchTerm" display="true" nodeType="${searchType}"  />
        [...]
    </s:form>

 

The question is:

I can use the file newFAQ.properties to view the name "Type 1", "Type 2" and "Type 3", in the place of type1, type2 and type3, in my newFAQ module. How can I see "Type 1", "Type 2" and "Type 3" in the combo box generated by <s:nodeProperty name="type" id="searchTerm" display="true" nodeType="${searchType}"  />?

Thank you for your answer.

Best regards,

 

--

Matteo

  • Custom search - node property choice list - translation
    2013/03/26 08:53

    dott_matte <p> Hi all,</p> <p> I implemented a new custom search with a filter on a property of my custom FAQ node. The definitions are follows:</p> <p> &nbsp;</p> <div> [jnt:newFAQ] &gt; jnt:content, jmix:editorialContent, mix:title, jmix:structuredContent</div> <div> &nbsp;- question (string) i18n</div> <div> &nbsp;- answer &nbsp; (string, richtext) i18n</div> <div> &nbsp;- type &nbsp; &nbsp; (string, choicelist[resourceBundle]) &lt; type1,type2,type3</div> <div> &nbsp;</div> <div> <div> [jnt:customSearchByType] &gt; jnt:content, jmix:structuredContent</div> <div> - result (weakreference, picker[type=&quot;page&quot;]) &lt; jnt:page</div> <div> - nodeType (string,choicelist[nodetypes=nt:base,resourceBundle]) indexed=no mandatory</div> <div> &nbsp;</div> <div> and here the implementation:</div> <div> <div> &nbsp;&lt;s:form method=&quot;get&quot; action=&quot;${searchUrl}&quot; class=&quot;frm&quot;&gt;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; [...]</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &lt;s:nodeProperty name=&quot;type&quot; id=&quot;searchTerm&quot; display=&quot;true&quot; nodeType=&quot;${searchType}&quot; &nbsp;/&gt;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; [...]</div> <div> &nbsp; &nbsp; &lt;/s:form&gt;</div> </div> </div> <p> &nbsp;</p> <p> The question is:</p> <p> I can use the file newFAQ.properties to view the name &quot;Type 1&quot;, &quot;Type 2&quot; and &quot;Type 3&quot;, in the place of type1, type2 and type3, in my newFAQ module. How can I see&nbsp;&quot;Type 1&quot;, &quot;Type 2&quot; and &quot;Type 3&quot; in the combo box generated by&nbsp;&lt;s:nodeProperty name=&quot;type&quot; id=&quot;searchTerm&quot; display=&quot;true&quot; nodeType=&quot;${searchType}&quot; &nbsp;/&gt;?</p> <p> Thank you for your answer.</p> <p> Best regards,</p> <p> &nbsp;</p> <p> --</p> <p> Matteo</p>

  • Number of messages  12
    Registration date Mar 26, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Custom search - node property choice list - translation

    by  rvt »  2013/04/16 22:03

    Matteo,

    top of my head you are looking for 

    <jcr:nodePropertyRenderer ...../>
    

    Ries
    www.riesvantwisk.com

     

  • Re: Custom search - node property choice list - translation
    2013/04/16 22:03

    rvt <p> Matteo,</p> <p> top of my head you are looking for&nbsp;</p> <div class="page" title="Page 40"> <div class="section"> <div class="layoutArea"> <div class="column"> <pre> <span style="font-size: 11.000000pt; font-family: 'CourierNewPSMT'; color: rgb(14.901960%, 14.901960%, 14.901960%)">&lt;jcr:nodePropertyRenderer ...../&gt; </span></pre> <p> Ries<br /> www.riesvantwisk.com</p> </div> </div> </div> </div> <p> &nbsp;</p>

  • Number of messages  185
    Registration date Apr 16, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page