Make Containers Support multiple Structures #2093

Closed
jtesser opened this Issue Feb 15, 2013 · 2 comments

Projects

None yet

5 participants

Contributor
jtesser commented Feb 15, 2013

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

@dsilvam dsilvam was assigned Feb 15, 2013
@dsilvam dsilvam added a commit that referenced this issue May 15, 2013
@dsilvam dsilvam first commit #2093 670fdc8
@dsilvam dsilvam added a commit that referenced this issue May 16, 2013
@dsilvam dsilvam second commit #2093 5fc2525
@dsilvam dsilvam added a commit that referenced this issue May 16, 2013
@dsilvam dsilvam #2093 2f829bb
@dsilvam dsilvam added a commit that referenced this issue May 17, 2013
@dsilvam dsilvam commit #2093 fca1e25
@dsilvam dsilvam added a commit that referenced this issue May 17, 2013
@dsilvam dsilvam #2093 d7b8594
@dsilvam dsilvam added a commit that referenced this issue May 21, 2013
@dsilvam dsilvam fixed affected code #2093 f662879
@dsilvam dsilvam added a commit that referenced this issue May 22, 2013
@dsilvam dsilvam #2093 f855f31
@dsilvam dsilvam added a commit that referenced this issue May 22, 2013
@dsilvam dsilvam remove for_metadata field #2093 7e87f37
@dsilvam dsilvam added a commit that referenced this issue May 24, 2013
@dsilvam dsilvam #2093 6f7fbe9
@dsilvam dsilvam closed this in 24e4ebf May 24, 2013
@jtesser jtesser modified the milestone: 3.0, 3.5 Sep 3, 2014

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment