dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
845 stars 465 forks source link

Make Containers Support multiple Structures #2093

Closed jtesser closed 11 years ago

jtesser commented 11 years ago

Daniel as we discussed.

The idea here is that we will add IFs to container services.

in the UI provide a Filtering Select of Structures. Allow them to be added and then removed. The filtering select is all Structured NOT currently selected.

We will need a second control to allow the User to define the code for the container for each Structure selected. Add this right above the precode field.

We will have to alter this later but get us something and we can adjust afterwards.

In addition for each structure the container takes add the links to Edit Mode.

Again we will do some XP cleanup after you are done here.

test cache and saving and all.


[2/19/13 9:37:50 PM] Will Ezell: what we want to do here is add a text column to the existing container table [2/19/13 9:37:54 PM] Daniel Silva: say container a, can hold structures a, b, c, d [2/19/13 9:37:55 PM] Will Ezell: and store JSON in it [2/19/13 9:38:01 PM] Daniel Silva: mmm [2/19/13 9:38:01 PM] Daniel Silva: got it [2/19/13 9:38:22 PM] Will Ezell: the json should be an arraylist of hashmaps [2/19/13 9:38:50 PM] Will Ezell: the hashmap should have a key of Structure Inode and a value of the velocity to be parsed for that structure [2/19/13 9:39:51 PM] Daniel Silva: but we have three code fields, pre, code and post [2/19/13 9:40:39 PM] Will Ezell: when we write out the container in the ContainerServices, we just do

if($content.structureInode = "adasdsa-asdasdasdsa-asdasasd")

{put the velocity to be eval'ed here)

$blech

elseif($content.structureInode = "bbbbbbb-bbbbbbbbb-bbbbbbbb")

$blah

end

[2/19/13 9:41:19 PM] Will Ezell: we loop over the arraylist of different structures defined for containers and spit out how they should be rendered [2/19/13 9:41:36 PM] Will Ezell: the pre is before everything [2/19/13 9:41:41 PM] Will Ezell: and the post is after everything [2/19/13 9:41:58 PM] Will Ezell: the #if is only for content added to the container [2/19/13 9:42:03 PM] Will Ezell: the use case is this [2/19/13 9:42:27 PM] Will Ezell: you have this page:

http://demo.dotcms.com/about-us/index.html [2/19/13 9:42:31 PM] Daniel Silva: so the pre and post do not vary per structure? [2/19/13 9:42:35 PM] Will Ezell: right [2/19/13 9:42:47 PM] Daniel Silva: only the code does [2/19/13 9:43:13 PM] Will Ezell: and on the left had side, you want to show short news item, a promo advertisement and then the Management team [2/19/13 9:44:26 PM] Will Ezell: you would create a "left hand side" container that defined what a news item placed in it would look like, what a promo ad would look like etc... [2/19/13 9:45:05 PM] Will Ezell: we will need to adjust the "edit mode" to allow a user to select what type of content to add or reuse [2/19/13 9:45:29 PM] Daniel Silva: yeah

bryanboza commented 10 years ago

Fixed, tested on Nightly Build 2014-09-03 // H2 // FF

DeanGonzalez commented 9 years ago

Doc created and saved, ready to publish when 3.0 releases and connected to TOC landing page as new doc: http://www.dotcms.com/docs/latest/Containers