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

Alex Kandzior alex at opencms.org
Wed May 16 08:13:07 CEST 2018


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.
<h1>Hello world</h1> 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:
> <container name="centercontainer" type="center" width="500" ...
> 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/) 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
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20180516/66658f11/attachment.htm>


More information about the opencms-dev mailing list