[opencms-dev] [opencms] How to specify multiple detail pages for a type
houcaoyu
houcaoyu at 163.com
Tue Dec 20 09:24:36 CET 2016
Hi Alex,
Thanks very much for your reply!
I got it. It seems Opencms 10.5 has lots of improvements.
I want to play with 10.5 next time!
And I solved my problem by the following steps (Opencms Version:10.01)
Work around steps:
1.create two detail pages in a same subsitemap, the path is like
/page/d1/index.html
/page/d2/index.html
2.in the fomater of the list , generate the link of detail page like this:
<cms:link>${pageUri}${content.id}</cms:link>
the ${pageUri} will be "/page/d1/" or "/page/d2/" , I set the value by other logic before this line.
(In my case , I judge the Category of the list items to set the ${detailPage})
Kind regards,
Hou.
At 2016-12-19 19:12:11, "Alex Kandzior" <alex at opencms.org> wrote:
If you want to specify the detail page in the <link> tag, you must update to OpenCms 10.5.
The attribute „detailPage“ for the link tag is new in 10.5. It allows you to specify the detail page used manually for a link.
In OpenCms before 10.5 you can have only one detail page per (sub)sitemap for an element type.
Kind regards,
Alex.
-------------------
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
Am 17.12.2016 um 09:09 schrieb houcaoyu <houcaoyu at 163.com>:
Hello
First sorry for my bad English.I'm Chinese.
I'm using Opencms 10.01.
I have two list pages for a same resource type , every page display different category.
The list pages are also detail pages for the resource type.
What I want is when clicking on a list item ,and jumping to the detail page ,
I want to specify which page to display the detail view.
The problem is now when I click on the list item ,it always jump to the default detail page.
I use this to generate the link of detail page.
<cms:link >${content.filename}</cms:link>"
And I also found that <cms:link> has a attribute named "detailPage" from the Tag Libray Reference.
"Set this attribute to link to a specific detail page."
But after I set the path of detail page(like "/page/d1/") to this attribute ,the list item can't be rendered.
I want to know what kind of value can pass to this attribute to specify a detail page.
And if you have other ways to solve my problem ,please share to me.
Thanks very much.
Hou.
_______________________________________________
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/20161220/ba1a66cb/attachment.htm>
More information about the opencms-dev
mailing list