Jahia Template Forum > how to get content...

0 (0 Good)
0 (0 Bad)

how to get content type ?

by  peters »  2011/06/07 20:02

Hi All

Do we have any methods in jahia which will return content type?
  • how to get content type ?
    2011/06/07 20:02

    peters Hi All<br/><br/>Do we have any methods in jahia which will return content type?

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

    Re: how to get content type ?

    by  shyrkov »  2011/06/07 20:02

    Hello,

    could you give a bit more details, please?
    What content type do you need to get?

    Kind regards
    Sergiy
  • Re: how to get content type ?
    2011/06/07 20:02

    shyrkov Hello,<br/><br/>could you give a bit more details, please?<br/>What content type do you need to get?<br/><br/>Kind regards<br/>Sergiy

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

    Re: how to get content type ?

    by  peters »  2011/06/07 20:02

    Hi

    Actually my container structure is

    [rolling_stone_templates:LikeContainer] gt jnt:container
    integer iLike=0

    I want to get the name of the container i.e iLikeConatiner in the code.
  • Re: how to get content type ?
    2011/06/07 20:02

    peters Hi<br/><br/>Actually my container structure is<br/><br/> [rolling_stone_templates:LikeContainer] gt jnt:container<br/>integer iLike=0<br/><br/>I want to get the name of the container i.e iLikeConatiner in the code.

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

    Re: how to get content type ?

    by  shyrkov »  2011/06/07 20:02

    Hello,

    how you obtain a container in your template?
    If you get it using e.g. lt;template:containerList/
  • Re: how to get content type ?
    2011/06/07 20:02

    shyrkov Hello,<br/><br/>how you obtain a container in your template?<br/>If you get it using e.g. lt;template:containerList/

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

    Re: how to get content type ?

    by  peters »  2011/06/07 20:02

    Actually ,i am using query tag to implement the search. i am able to data like title and body.
    now i have to create a href like

    lt;a href=
  • Re: how to get content type ?
    2011/06/07 20:02

    peters Actually ,i am using query tag to implement the search. i am able to data like title and body.<br/>now i have to create a href like<br/><br/> lt;a href=

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

    Re: how to get content type ?

    by  shyrkov »  2011/06/07 20:02

    Could you, please, post your code (query other part) here?
  • Re: how to get content type ?
    2011/06/07 20:02

    shyrkov Could you, please, post your code (query other part) here?

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

    Re: how to get content type ?

    by  pap@commaro.com »  2011/06/07 20:02

    Hello,

    what is the reason that you use container queries for site search ?

    You could for instnace try the following:

    [code:1r54npor]lt;template

    Benjamin Papez (pap@commaro.com)

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

    Re: how to get content type ?

    by  peters »  2011/06/07 20:02

    thanks for your inputs.

    :)
  • Re: how to get content type ?
    2011/06/07 20:02

    peters thanks for your inputs.<br/><br/> <!-- s:) --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!-- s:) -->

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

    Re: how to get content type ?

    by  pap@commaro.com »  2011/06/07 20:02

    you're welcome!

    If you would do that with the search tags, you can get the same info in the following way:

    lt;s:resultIterator

    Benjamin Papez (pap@commaro.com)

    Number of messages  220
    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