Jahia Template Forum > Container query...

0 (0 Good)
0 (0 Bad)

Container query with constraints on elements

by  mesdocs »  2011/06/07 19:55

Hello,

I want to create multiple media galleries based on the media type ('image','audio','video').

The container could be defined like

[my_templates:mediaContainer] gt jnt:container
smallText title
File mediaFile

Is it possible to define a query for the mediaContainer type with constraints on mediaFile MimeType ?
How ?

Mesdocs.
  • Container query with constraints on elements
    2011/06/07 19:55

    mesdocs Hello,<br/><br/>I want to create multiple media galleries based on the media type ('image','audio','video').<br/><br/>The container could be defined like<br/><br/>[my_templates:mediaContainer] gt jnt:container<br/>smallText title<br/>File mediaFile<br/><br/>Is it possible to define a query for the mediaContainer type with constraints on mediaFile MimeType ?<br/>How ?<br/><br/>Mesdocs.

  • Number of messages  53
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Container query with constraints on elements

    by  pap@commaro.com »  2011/06/07 19:55

    Hello Mesdocs,

    unfortunately there is no standard or documented way to do that. The problem is that JSR-283 standard states that the propertyName should be part of the NodeType definition. Our query tags are based on that standard.

    However you could make a query without setting the propertyName, just the searchExpression and if you know how the fields are stored in Lucene (index can be viewed with Lucene) you could use a Lucene search expression. For instance to get all image mime-types you could try using this.

    [code:3vl4j9ui]
    lt;content

    Benjamin Papez (pap@commaro.com)

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

    Re: Container query with constraints on elements

    by  mesdocs »  2011/06/07 19:55

    Hi Benjamin,

    Thanks a lot for you answer.

    I will create a template for each media type (audio, video, image).

    Regards

    Mesdocs.
  • Re: Container query with constraints on elements
    2011/06/07 19:55

    mesdocs Hi Benjamin,<br/><br/>Thanks a lot for you answer.<br/><br/>I will create a template for each media type (audio, video, image).<br/><br/>Regards<br/><br/>Mesdocs.

  • Number of messages  53
    Registration date Jun 7, 2011
    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