[opencms-dev] Detail pages

Nguyen Thu Ha boboha2001 at yahoo.com
Wed Aug 1 04:34:30 CEST 2012


Hi List!

I create a content type "News" and this has the URI /my-page/tin-tuc/news/news_00012.html in OpenCms804. The news' title is "my title". The detail page has the path "/my-page/news/". OpenCms generates a link,  /my-page/tin-tuc/news/news_0001.html,  instead of /my-page/news/my-title/ and the news cant load, and I receive error "It's not possible to get the String value of a nested XML content definition".

What is happen? Can you help me.
Thanks alot. 
Hant.



________________________________
 From: Alexander Kandzior <alex at opencms.org>
To: 'The OpenCms mailing list' <opencms-dev at opencms.org> 
Sent: Tuesday, July 24, 2012 7:58 PM
Subject: Re: [opencms-dev] Detail pages
 

Andy,
 
sorry we have no better guide at the moment but maybe I can help explain the broad concept.
 
The container page you got pretty correct. Basically the container page allows you to combine several pieces of content in one page. This is suitable for all pages that make up the main navigation. All container pages are therefore managed “by hand” in the OpenCms sitemap.
 
Now think of a “News ticker”. The individual news messages are usually not part of the main navigation / sitemap. That is where the detail page comes into the picture. You define one page as the detail page for a specific piece of content, e.g. the “News detail page”. This detail page has a place in the sitemap. So all individual news messages are automatically displayed using this detail page, and their URL is calculated automatically. The mechanism that shows the news on the detail page is in pretty much the same as on a standard container page, with the difference that the content for this specific container is selected dynamically and not by hand.
 
What I'm unclear on is when I use an internal link to a specific piece of content, where this goes to, what's loaded, and the use of detailpages to provide a specific formatting/template/rendering for all resources of the same type.
 
Let’s say you have a content type “News”, and this has the URI /.content/news/news_00012.html in OpenCms. 
If you directly link to this content in OpenCms 8, then the following happens: 
1.    OpenCms recognizes that you are in an OpenCms 8 ADE enabled sitemap.
2.    Depending on the sitemap you are currently in, it will look up the configured detail page for news. Let’s say this detail page has the path “/news/”.
3.    OpenCms will now generate a link, based on the path of the detail page and the mapped title of the news. Let’s say the title of the news was “Some great title”, the so the link created would be “/news/Some-great-title/”.
4.    When this link is followed in the browser, OpenCms recognizes that “/news/” is in fact a detail page, and will then load the news based on the rest of the URL “/Some-great-title/”. For this there exists a title-to-id mapping table in OpenCms 8.
5.    In the template used for the detail page you need to specify the container for the detail view. The content of this container will be automatically filled by the formatter used for the selected news. 
 
Hopefully this helps a bit. Feel free to ask more questions.
 
Kind Regards,
Alex.
-------------------
Alexander Kandzior
                                                              
Alkacon Software GmbH  - The OpenCms Experts                 
http://www.alkacon.com - http://www.opencms.org                  
 
 
From:opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Andrew Adams
Sent: Tuesday, July 24, 2012 8:06 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Detail pages
 
Hey all,
 
I was curious if there was a guide to setting up detail pages on-line.  The documentation is a bit ambiguous and in all honestly I'm finding some difficulties grasping the concept within itself.
 
What I understand so far is that at it's core you have container pages in OpenCms which has container elements; these are hooked up to templates via the "template" property. You provide this container elements with data through the use of the ADE navigator and creating structured xml content, which is formatted through the page through formatters which are specified in the content's schema.  
 
What I'm unclear on is when I use an internal link to a specific piece of content, where this goes to, what's loaded, and the use of detailpages to provide a specific formatting/template/rendering for all resources of the same type.
 
Thanks,
Andy 
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120731/fdcd24be/attachment.htm>


More information about the opencms-dev mailing list