Jahia Template Forum > Jahia 6 Community...

0 (0 Good)
0 (0 Bad)

Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hi,

I'd like to retrieve the size of a containerList populated by a query.
My page will have different rendering if the result size is 1 or
more.

I have tested (and printed) the size attribute of the containerList
tag but it seemed to be empty.

How can I get this information ?

Thanks.

Mesdocs.

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hello,

the following example shows how to get the size of a container list (no
matter if it is populated by a query or not - the size property is
available on the ContainerListBean instance, exposed into its scope by
lt;template:containerList/

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hello,

This the code i test. my_templates derives from web_templates.

lt;template:containerList id=

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hello,

I code the template in the same manner as the web_templates.

The taglib has been translated. I found this line of code in the
resulting java file :

_jspx_th_c_005fif_005f1.setTest(((java.lang.Boolean)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(quot;${actusList.size
== 0 }

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hi Mesdocs,

I think the problem in your code is that the name=quot;actusContainer

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

'That's it !

Adding the name attribute to the containerList solves the problem.

Thank you very much.

Mesdocs.

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Im using this code below derives from news/definitions.inc

I would like to use notitleoverwrite property in order to remove the input field for the page title (jahia 5. guide p. 34).

lt;content:declareField name=

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hello,

quot;notitleoverwrite

  (admin)

Number of messages  61
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia 6 Community Edition - size of a containerList populate

by  admin »  2011/06/07 19:53

Hello,


gt;

  (admin)

Number of messages  61
Registration date
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