Jahia Template Forum > Jahia 5: How to...

0 (0 Good)
0 (0 Bad)

Jahia 5: How to create a Master Detail News page?

by  adanbouzoua »  2011/06/07 20:01

I would like to modify the News page in order to create a classic Mater-Detail pages.
In summary I would like to display just the introduction of the news on the current news template page and on the second page display the news full story.

How can I link the title to the detail (simple template) page.

In others words how can I underneath of the Title link of Master page pass the current news container ID to the Detail page and display the current container fields on the Detail page.

[b:35xx4f05]Initial[/b:35xx4f05]
Title
Description
Link
Date

[b:35xx4f05]Modified[/b:35xx4f05]
Title
Description
Link
Date
Detail_Page (page) *
Full_Story (big text)*
  • Jahia 5: How to create a Master Detail News page?
    2011/06/07 20:01

    adanbouzoua I would like to modify the News page in order to create a classic Mater-Detail pages.<br/>In summary I would like to display just the introduction of the news on the current news template page and on the second page display the news full story. <br/><br/>How can I link the title to the detail (simple template) page.<br/><br/>In others words how can I underneath of the Title link of Master page pass the current news container ID to the Detail page and display the current container fields on the Detail page.<br/><br/>[b:35xx4f05]Initial[/b:35xx4f05]<br/> Title <br/> Description <br/> Link <br/> Date<br/><br/>[b:35xx4f05]Modified[/b:35xx4f05]<br/> Title <br/> Description <br/> Link <br/> Date<br/> Detail_Page (page) *<br/> Full_Story (big text)*

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

    Re: Jahia 5: How to create a Master Detail News page?

    by  shuber »  2011/06/07 20:01

    Basically you can reproduce something like what we have done in our default demonstration in Jahia 6, that is to say to pass the container ID as an URL query parameter, fetch that and render the detail view this way. For more details you have have a look at the quot;news

    Serge Huber (shuber)

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

    Re: Jahia 5: How to create a Master Detail News page?

    by  adanbouzoua »  2011/06/07 20:01

    Thanks Shuber

    I have been able to make it works.

    Master page:
    I am passing the pageID and current containerID to detail page.

    Detail page:
    I can retrieve the absolute container list and I can filter (using JSTL) the containerList and display only the current Container using containerID

    [b:2a8q4ilt]But, but ... [/b:2a8q4ilt]
    1. SECURITY:
    I am wondering about security I am passing containerID via URL.
    Do I have to validate the query parameters (trivial ;) ) or is Jahia is having internal security mechanism to prevent SQL injection (?)
    2. Performance/Optimization:
    2.1 what about if my Articles containerList getting bigger ?
    2.2 Is it better (=performance) to make it using Container Query tags ?
    2.3 Can I get access directly to the container on the detail page without looping the Articles Containers list?


    Notes:
    But its wasn?��t that evident-not documented- to retrieve the current container inside the absolute boxContainerList in Jahia 5.
    But the chapter quot;Sub Container List Addressing
  • Re: Jahia 5: How to create a Master Detail News page?
    2011/06/07 20:01

    adanbouzoua Thanks Shuber<br/><br/>I have been able to make it works. <br/><br/>Master page:<br/>I am passing the pageID and current containerID to detail page.<br/><br/>Detail page:<br/>I can retrieve the absolute container list and I can filter (using JSTL) the containerList and display only the current Container using containerID<br/><br/>[b:2a8q4ilt]But, but ... [/b:2a8q4ilt]<br/>1. SECURITY: <br/>I am wondering about security I am passing containerID via URL.<br/>Do I have to validate the query parameters (trivial <!-- s;) --><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!-- s;) --> ) or is Jahia is having internal security mechanism to prevent SQL injection (?)<br/>2. Performance/Optimization: <br/> 2.1 what about if my Articles containerList getting bigger ? <br/>2.2 Is it better (=performance) to make it using Container Query tags ?<br/>2.3 Can I get access directly to the container on the detail page without looping the Articles Containers list?<br/><br/><br/>Notes:<br/>But its wasn?��t that evident-not documented- to retrieve the current container inside the absolute boxContainerList in Jahia 5.<br/>But the chapter quot;Sub Container List Addressing

  • Number of messages  14
    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