--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
I think I would look into creating a custom workflow [1]. Or you could look into creating some kind of document wizard, see [2] for inspiration. Your DaemonModule can also make use of workflows, though this will have to be a cms only daemon module most likely. In any case you want to be hooking into the workflows.You could also file an improvement issue to have a native compound type with which you can directly upload to the assets folder. This does introduce some issues however and I cannot guarantee such an improvement would be accepted. Even if it was it would not be available quickly.On Fri, Jun 9, 2017 at 3:04 AM, <tony.h...@gmail.com> wrote:Hi,Im a newbie to Hippo and maybe I am going about this in entirely the wrong way so any advice is appreciated.I have created a "parent" Document Type which contains an embedded List of Custom Compound Types corresponding to videos. (i.e. properties including title, introduction and url for each video). In addition, each of the videos may include taxonomy keys.
What I want to do when the parent document is published, is copy the embedded Videos to a separate document in a dedicated "videos" folder to enable them to be separately searchable and independently retrieved.
From a usability perspective, my client does not want to create the Video document separately in the CMS and "link" them to the parent.
The simplistic approach I have taken so far is to register an implementation of the DaemonModule and listen for publication events for the parent document, and then try and manually create a new Video document for each of the embedded videos. However this can't be the correct way to achieve this as I have no idea how to populate the various hippo-related properties, so I suspect I need to submit the raw document to some sort of workflow.
----Can anyone provide some guidance or pointers please?ThanksTony
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Minos Chatzidakis
Product consultant
p. e. | +31 20 522 44 66 |
Hi Tony,On Mon, Jun 12, 2017 at 10:18 AM, Jasper Floor <jasper...@bloomreach.com> wrote:I think I would look into creating a custom workflow [1]. Or you could look into creating some kind of document wizard, see [2] for inspiration. Your DaemonModule can also make use of workflows, though this will have to be a cms only daemon module most likely. In any case you want to be hooking into the workflows.You could also file an improvement issue to have a native compound type with which you can directly upload to the assets folder. This does introduce some issues however and I cannot guarantee such an improvement would be accepted. Even if it was it would not be available quickly.On Fri, Jun 9, 2017 at 3:04 AM, <tony.h...@gmail.com> wrote:Hi,Im a newbie to Hippo and maybe I am going about this in entirely the wrong way so any advice is appreciated.I have created a "parent" Document Type which contains an embedded List of Custom Compound Types corresponding to videos. (i.e. properties including title, introduction and url for each video). In addition, each of the videos may include taxonomy keys.So the "video" is quite a rich entity in your project, so I begin by saying that making a compound sounds wrong. Instead, it sounds right to make a document type for it and allow for the reusability of videos (in multiple documents), which you lose if you go with compounds.
What I want to do when the parent document is published, is copy the embedded Videos to a separate document in a dedicated "videos" folder to enable them to be separately searchable and independently retrieved.What do you mean "copy"? As you mentioned a video is essentially just a url. So what exactly do you wanna copy? The string url? Or download the video and store it in the CMS? (Not recommended). And what does "searchable video" mean?From a usability perspective, my client does not want to create the Video document separately in the CMS and "link" them to the parent.Really? So what happens if I use the same video url in 2 separate "parent" documents? Will you copy it twice?The simplistic approach I have taken so far is to register an implementation of the DaemonModule and listen for publication events for the parent document, and then try and manually create a new Video document for each of the embedded videos. However this can't be the correct way to achieve this as I have no idea how to populate the various hippo-related properties, so I suspect I need to submit the raw document to some sort of workflow.This is the way, and you can use the built-in FolderWorkflow to create new VideoDocuments and populate any properties you need afterwards, your code more or less will look like this:WorkspaceDecorator workspaceDecorator = (WorkspaceDecorator) session.getWorkspace();FolderWorkflow folderWorkflow = (FolderWorkflow) workspaceDecorator.getWorkflowManager().getWorkflow("threepane", session.getNode("/content/documents/myhippoproject/folderYouWantYourNewVideoDocumentIn"));String docPath = folderWorkflow.add("new-video-document-template", "myhippoproject:videodocument", "nameOfYourNewDocument");//... get the node of the new document and set your propetiesNote that a daemon module uses a different session, so the new video documents will be not be created by the user who initially made the "parent" document. You need to use SCXML for that.In my opinion you're deviating a lot from the ootb workflow, sacrificing reusability on the way and ending with custom code that can make your upgrades and maintenance hard. If you're new to Hippo then I would suggest you don't go this route, but instead try to convince your client otherwise or ask for more official support from a Bloomreach consultant (contact sales).
On Mon, Jun 12, 2017 at 11:37 AM, Minos Chatzidakis <minos.chatzidakis@bloomreach.com> wrote:Hi Tony,On Mon, Jun 12, 2017 at 10:18 AM, Jasper Floor <jasper...@bloomreach.com> wrote:I think I would look into creating a custom workflow [1]. Or you could look into creating some kind of document wizard, see [2] for inspiration. Your DaemonModule can also make use of workflows, though this will have to be a cms only daemon module most likely. In any case you want to be hooking into the workflows.You could also file an improvement issue to have a native compound type with which you can directly upload to the assets folder. This does introduce some issues however and I cannot guarantee such an improvement would be accepted. Even if it was it would not be available quickly.On Fri, Jun 9, 2017 at 3:04 AM, <tony.h...@gmail.com> wrote:Hi,Im a newbie to Hippo and maybe I am going about this in entirely the wrong way so any advice is appreciated.I have created a "parent" Document Type which contains an embedded List of Custom Compound Types corresponding to videos. (i.e. properties including title, introduction and url for each video). In addition, each of the videos may include taxonomy keys.So the "video" is quite a rich entity in your project, so I begin by saying that making a compound sounds wrong. Instead, it sounds right to make a document type for it and allow for the reusability of videos (in multiple documents), which you lose if you go with compounds.I agree with you 100%, but I think this is exactly the workflow he is looking to avoid.
What I want to do when the parent document is published, is copy the embedded Videos to a separate document in a dedicated "videos" folder to enable them to be separately searchable and independently retrieved.What do you mean "copy"? As you mentioned a video is essentially just a url. So what exactly do you wanna copy? The string url? Or download the video and store it in the CMS? (Not recommended). And what does "searchable video" mean?From a usability perspective, my client does not want to create the Video document separately in the CMS and "link" them to the parent.Really? So what happens if I use the same video url in 2 separate "parent" documents? Will you copy it twice?The simplistic approach I have taken so far is to register an implementation of the DaemonModule and listen for publication events for the parent document, and then try and manually create a new Video document for each of the embedded videos. However this can't be the correct way to achieve this as I have no idea how to populate the various hippo-related properties, so I suspect I need to submit the raw document to some sort of workflow.This is the way, and you can use the built-in FolderWorkflow to create new VideoDocuments and populate any properties you need afterwards, your code more or less will look like this:WorkspaceDecorator workspaceDecorator = (WorkspaceDecorator) session.getWorkspace();FolderWorkflow folderWorkflow = (FolderWorkflow) workspaceDecorator.getWorkflowManager().getWorkflow("threepane", session.getNode("/content/documents/myhippoproject/folderYouWantYourNewVideoDocumentIn"));String docPath = folderWorkflow.add("new-video-document-template", "myhippoproject:videodocument", "nameOfYourNewDocument");//... get the node of the new document and set your propetiesNote that a daemon module uses a different session, so the new video documents will be not be created by the user who initially made the "parent" document. You need to use SCXML for that.In my opinion you're deviating a lot from the ootb workflow, sacrificing reusability on the way and ending with custom code that can make your upgrades and maintenance hard. If you're new to Hippo then I would suggest you don't go this route, but instead try to convince your client otherwise or ask for more official support from a Bloomreach consultant (contact sales).Most likely some form of document wizard would fit the usecase best. But listen to Minos, he knows things.
p. e. |
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
--
p.
e.
_________________________________________________________________________________