[opencms-dev] Totally lost with list and detail page

Gerd Schrick mail at schrick-design.de
Tue May 22 12:40:27 CEST 2018


Thank you for clarification, will try it later.

Does that mean I can't use a page-relative  location to store? Currently I only use the "with page" option for the resource type.

Gerd

Am 22. Mai 2018 08:13:00 MESZ schrieb Michael Emmerich <m.emmerich at alkacon.com>:
>Gerd,
>
>you are almost there
>
>The detail page mechanism only works if the files you want to display 
>("my-news" in your example) are stored in the configured path in the 
>module config. If not, you will get a link to the content itself and
>not 
>to the detail page.
>
>In 1) You say that you use the default setting for filename, so the 
>system would use /.content/my-news/ to store the single contents.
>In 3) you say that your collector refers to the folder 
>/news/aritcle/.elements/ which is different to the default storage 
>locataion.
>
>So there are two options:
>
>a) Modify your moduel config that the path for your content files is 
>/news/articles/.elements/
>b) Or store your new articles in the default location
>/.content/my-news/
>
>This should help.
>
>Kind regards,
>Michael
>
>
>
>Am 20.05.2018 um 21:17 schrieb Gerd Schrick:
>> DETAIL PAGE: again spent some (frustrating) hours with searching and 
>> trying ... and still don't know why they don't work.
>>
>> What I have:
>> 1. my-news resourcetype in module:
>> - Title mapped to urlName
>> - "with page" is set
>> - disable detail page is unset
>> - no filename pattern specified (the default is used; works)
>> 2. Container page "/news/article/"
>> - the single and only container in the template with
>detailview="true"
>> - configured as detail page in sitemap .config and
>> - sitemap shows it by the addition "(*my-news)"
>> - news items are correctly stored in subfolder .elements/
>> 3. Container page "/news/" with a list
>> - created via collector
>> - links rendered via <cms:link>
>> - correctly collects and shows the items stored in 
>> "/news/article/.elements/"
>> - links are NOT rewritten and just point to the items content element
>
>> (e.g. /news/article/.elements/my-news_0002.xml)
>>
>> Is there something more to be configured?
>> Some restrictions or further requiremens/conditions to be met that a 
>> detail page will be used for the resourcetype?
>>
>> Would be great if someone can help with this.
>> Gerd
>>
>> Am 17. Mai 2018 01:41:46 MESZ schrieb Gerd Schrick 
>> <mail at schrick-design.de>:
>>
>>     Alex,
>>
>>     you made my day! :-)
>>     "Your function element also needs to generate some output." was
>the perfect hint - missing/wrong default values in element settings
>produced an initial Error in the function; with that corrected the
>dropping works perfectly.
>>     BTW: a really cooool feature of OCMS (among many others).
>>
>>     But I'm still stuck with the detail page:
>>     when I click on the link in the list I get (in Chromium):
>>     -
>>     This page contains the following errors:
>>     error on line 20 at column 122: xmlParseEntityRef: no name
>>     -
>>     when in preview mode it says:
>>     -
>>     This page contains the following errors:
>>     error on line 41 at column 132: Opening and ending tag mismatch:
>img line 0 and a
>>     -
>>     in Firefox I get:
>>     -
>>     XML-Verarbeitungsfehler: nicht wohlgeformt
>>    
>Adresse:http://localhost:8080/opencms/news/article/.elements/my-news_0002.xml
>>     Zeile Nr. 20, Spalte 122:(function(a,b){function G(a){var
>b=F[a]={};return ......
>>     -
>>
>>     I can edit the news item(s), use add and edit them in the list,
>display and edit the (details) containerpage itself including an item,
>all w/o errors.
>>     So I assume it has something to do with my config of the details
>page.
>>     I've set it up multiple times, changed the config, played around
>... with no success (and further ideas) yet.
>>
>>     Would be really great to get some insights here too.
>>
>>     Thanks ahead,
>>     Gerd
>>
>>     Alex Kandzior <alex at opencms.org> hat am 16. Mai 2018 um 08:13
>geschrieben:
>>
>>         Gerd, you are on the right track. The container type of the
>>         container tag must match the one configured in the function
>>         element (or formatter). So setting both types to "center" or
>>         "somethingother" should work. You should not use the "width"
>>         together with the type, only either the type or the width.
>>         "width" does not make no sense in modern respinonsive layouts
>>         so I consider it deprecated, but it still is supported. Your
>>         function element also needs to generate some output. If the
>>         function element does not generate any output, it can not be
>>         dropped even if the container types match. Hello world would
>>         word. HTH Kind regards, Alex. ------------------- Alexander
>>         Kandzior Alkacon Software - The OpenCms Experts
>>         http://www.alkacon.com - http://www.opencms.org
>>
>>             Am 15.05.2018 um 19:33 schrieb Gerd Schrick <
>>             mail at schrick-design.de>: UPDATE re dynamic function:
>>             manually adding a dyn function element to the container
>>             with "Edit controlcode" works and I can then edit it in
>>             ADE. But via dropping the container does not accept it
>>             (shows no dashed red lines in ADE). Can see it in Apollo
>>             demo working with the "OpenCms Info" dyn function element
>>             ... compared its config to mine and cannot see what may
>>             basically make the difference. For my understanding it's
>>             the container's type that determines what elements can go
>>             there: In func element I set type to "center" but also
>>             tried "*" and width min=50/max=800 w/o success. Are there
>>             some other settings that do the trick? Gerd Am 15. Mai
>>             2018 04:43:45 MESZ schrieb Gerd Schrick <
>>             mail at schrick-design.de>:
>>
>>                 Dear All, in 10.5.3 (tomcat 8 standalone) I tried to
>>                 set up a list and detail page as described in the
>doku
>>                
>(http://documentation.opencms.org/opencms-documentation/content-in-opencms/lists-of-resources-and-detail-pages/)
>>                
><http://documentation.opencms.org/opencms-documentation/content-in-opencms/lists-of-resources-and-detail-pages/%29>
>>                 for some hours now but it ended just in a mostly
>>                 frustrating adventure ... hopefully someone can help
>>                 to proceed with more success. ;-) Here in short my
>>                 issues: 1) created news_list.jsp and a dynamic
>>                 function in my module ... unable to "drop it on a
>>                 container page" (I can drag it but the container
>won't
>>                 accept it) - how to enable that? finally was able to
>>                 create a new list-page after I added it as Function
>to
>>                 module config - is this the only way? 2) list works
>as
>>                 expected but no "+" shows up to add a new item
>>                 although the docu says: "[...] if the attribute
>>                 editable is set to true [...]" my config is:
>>                 <cms:contentload collector="allInFolder"
>>                 param="${folder}|my-news|${count}" editable="true">
>>                 when I add "|${folder}my-news_%(number).xml" (or
>>                 something else) to the param attribute the + is shown
>>                 but then I finally get an error "The new file name
>>                 pattern "/news/article/.elements/" does not contain
>>                 the number macro." when selecting "Copy" or "New" in
>>                 the dialog that shows after a click on the +. UPDATE:
>>                 just found out that it works when I use
>>                
>param="${folder}my-news_%(number).xml|my-news|${count}"
>>                 - this should be mentioned! Is there a doku about the
>>                 collectors and their parameters? Where to find? I
>>                 still can't get collector "allInFolderNavPos" to work
>>                 ... 3) added a detail page as described and checked
>in
>>                 sitemap config but a click on the item link in the
>>                 list as well as in explorer on the item's content
>file
>>                 via context menu > Display says there's no detail
>page
>>                 configured for the resource (but it is and it's not
>>                 disabled in the module config!?) And yes, I'd like to
>>                 use and understand the "old" way, although an
>>                 alternative for V10+ is recommended (what I did not
>>                 try yet). Any help is greatly appreciated. Thanks a
>>                 lot, Gerd 
>>
>>            
>------------------------------------------------------------------------
>>             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 
>>
>>
>>        
>------------------------------------------------------------------------
>>         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
>
>>
>>    
>------------------------------------------------------------------------
>>
>>     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
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>>
>
>-- 
>Alkacon Software GmbH & Co. KG - The OpenCms Experts
>Michael
>
>  
>http://www.alkacon.com
>http://www.opencms.org
>
>
>Geschäftsführer: Alexander Kandzior, Amtsgericht Köln, HRB 54613
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20180522/19d8073b/attachment.htm>


More information about the opencms-dev mailing list