Adding a document from custom folder to CHannel Manager navigation menu

354 views
Skip to first unread message

Pradeepa Kadiyala

unread,
May 31, 2016, 9:04:58 AM5/31/16
to Hippo Community
HI All,

I am new to Hippo and trying to create templates and view them through the preview fucntionality in VIew Menu of Content tab.
If i add documents to the already present Content folder, i am able to select them from the document selector dialog in Edit Menu dialog. 
But when i try to do the same for the documents added in my own new folders, i am unable to. Can u guide me what am i doing wrong here?

Please find screenshots for your reference

content_menu_selector.PNG
template_folder.PNG
Template_menu_selector.PNG

Jasper Floor

unread,
Jun 1, 2016, 5:41:13 AM6/1/16
to Hippo Community
Hi,

you can only view documents which can actually be viewed on the site (ignoring publication status). So there has to be a path to them from the sitemap. Otherwise the system doesn't know what template and component are related to that page. So just adding a folder isn't enough, you have to define a path to that folder. A path in the sitemap can be made of wildcards, so it is possible to set it up for unknown folders.

mvg,
Jasper

--
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-c...@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-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Pradeepa Kadiyala

unread,
Jun 1, 2016, 6:42:22 AM6/1/16
to Hippo Community
Thanks Jasper for the quick response.. 
I tried playing with the hst configurations by following what was already present for the content folder and  ended up crashing my Channel Manager.  Did you mean to say something like this?


On Wednesday, 1 June 2016 15:11:13 UTC+5:30, Jasper Floor wrote:
Hi,

you can only view documents which can actually be viewed on the site (ignoring publication status). So there has to be a path to them from the sitemap. Otherwise the system doesn't know what template and component are related to that page. So just adding a folder isn't enough, you have to define a path to that folder. A path in the sitemap can be made of wildcards, so it is possible to set it up for unknown folders. Also i replicated all the other hst configurations as well.  
My template looks like theo ne attached. 
ALso added a TemplatesDocument java class for the template i defined. 

 I am just starting to try to understand the underlying configurations and how they work in Hippo .. SO please bear with my stupid questions. 
Awaiting your guidance
hst_1.PNG
template_1.PNG
TemplatesDocument.PNG

Jasper Floor

unread,
Jun 1, 2016, 6:52:02 AM6/1/16
to Hippo Community
On Wed, Jun 1, 2016 at 12:42 PM, Pradeepa Kadiyala <pradi...@gmail.com> wrote:
Thanks Jasper for the quick response.. 
I tried playing with the hst configurations by following what was already present for the content folder and  ended up crashing my Channel Manager.  Did you mean to say something like this?

What was the error? Something like is what I meant. 

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 1, 2016, 6:57:25 AM6/1/16
to Hippo Community
THiss is the stacktrace that i am getting in the logs on loading the channel manager.
Also my View menu in the Document Manager disappered.

[INFO] [talledLocalContainer] Caused by: java.lang.IllegalStateException: Unknown document url service 'live.site.document.url.service' configured for the website actions plugin. Please set the config
uration property 'document.url.service.id'
[INFO] [talledLocalContainer]   at org.onehippo.cms7.channelmanager.plugins.social.SocialSharingPlugin.<init>(SocialSharingPlugin.java:66)
[INFO] [talledLocalContainer]   ... 58 more
[INFO] [talledLocalContainer] 16:07:34 INFO  Exporting content/documents/myhippoproject/templates.xml to module bootstrap/content
[INFO] [talledLocalContainer] 01.06.2016 16:07:36 ERROR http-nio-8080-exec-1 [PluginFactory.createPlugin:87] java.lang.IllegalStateException: Unknown document url service 'live.site.document.url.servi
ce' configured for the website actions plugin. Please set the configuration property 'document.url.service.id'
[INFO] [talledLocalContainer] java.lang.reflect.InvocationTargetException
[INFO] [talledLocalContainer]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[INFO] [talledLocalContainer]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[INFO] [talledLocalContainer]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[INFO] [talledLocalContainer]   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
[INFO] [talledLocalContainer]   at org.hippoecm.frontend.plugin.impl.PluginFactory.createPlugin(PluginFactory.java:69)
[INFO] [talledLocalContainer]   at org.hippoecm.frontend.plugin.impl.PluginManager.start(PluginManager.java:84)

Pradeepa Kadiyala

unread,
Jun 1, 2016, 8:13:21 AM6/1/16
to Hippo Community
Hi Jasper,

I did the entire configurations again. :) 
Able to open my Channel Manager now
Able to find my documents from the document selector for menu also

Now just 1 problem remains, when i click on the menu tab i am not able to see the content that i filled in the document.
It shows an empty document with just the menu bar above it.

Any further configurations required?
Thanks in advance for your guidance.

Jasper Floor

unread,
Jun 1, 2016, 8:53:46 AM6/1/16
to Hippo Community
You might need to throwaway your preview channel. Any time you make changes in the console you should remove the preview channel, or do the changes in the preview and publish them through the channel manager. If you don't your changes will get removed the next time you do publish from the channel manager.

Not sure what is happening with that exception, will have to investigate. Not sure if I will have time today.

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 2, 2016, 5:00:18 AM6/2/16
to Hippo Community
Hey Jasper! 
I tried digging in a bit and found some ftl related errors in the logs. 
It seems to be failing in picking up the document.text, document.string etc the fields i defined in the document. 
it finds the values in these fields as null.
any references available for this ?

Jasper Floor

unread,
Jun 2, 2016, 5:05:44 AM6/2/16
to Hippo Community
Ah, it sounds like the component backing it isn't loading the document. I would guess it tries to find a specific type of document and that your new documents have a different type.

mvg,
Jsaper

Pradeepa Kadiyala

unread,
Jun 2, 2016, 5:36:47 AM6/2/16
to Hippo Community
If you look at the screenshots form my 2nd reply that is the document type that i prepared. And the documents have the same document type. 
i tried with putting simple <ul> with document.properties being iterated over but even that returned a null.
simple html with a <h2> tag worked. but apart form that the document referring thing is failing. attaching the ftl for yout reference.
templateslist-main-templateslist.ftl
variant.ftl

Jasper Floor

unread,
Jun 2, 2016, 5:54:19 AM6/2/16
to Hippo Community
Can you share your component class and sitemap items?

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 2, 2016, 6:22:24 AM6/2/16
to Hippo Community
Hi jasper have attached the files. please take a look
TemplatesDocument.java
sitemap.xml

Jasper Floor

unread,
Jun 2, 2016, 6:57:37 AM6/2/16
to Hippo Community
Hi,

that class is the bean representing the document. In you sitemap you will see componentconfigurationid which in this case is hst:pages/templatelist. In that configuration is should have a class configured. Can you share that class?

I'm thinking that the document object is null rather than just the properties on the document.

mvg,
Jasper

--

Pradeepa Kadiyala

unread,
Jun 2, 2016, 9:04:19 AM6/2/16
to Hippo Community
Hi Jasper,
I am sorry but i am still trying to understand the underlying framework of Hippo. 
COuld you guide me where i can find the associated class for this. 
I have attached the screenshot of the componentconfigurationid that you said was configured. I followed the configurations of the content folder for doing these configs
sitemap_template.PNG

Jasper Floor

unread,
Jun 2, 2016, 10:21:49 AM6/2/16
to Hippo Community
Next to the componentconfigurationid you see a link /hst:hst/hst:configurations/myhippoproject/hst:pages/templatelist. In that the component class is most likely configured (but beware that there could be inheritance involved so you may need to go back further).

I'm wondering if you know about our tutorials:

They may help guide you through these details. The system is quite large and it can be daunting trying figure everything out.

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 3, 2016, 1:35:07 AM6/3/16
to Hippo Community
Hey!

I think i missed that componentclassname properrty alltogether.  I will go through this and see if I can move any further. Thanks for the inputs.
As for the tutorials we are following them. But since we are new all this is too confusing to be learnt in one go. 
Does Hippo conduct any sessions for organisations? If yes we would love to join the sessions or webinars as our team will have to work on Hippo for quite some time in the future. :)
templatelist_hst.PNG

Jasper Floor

unread,
Jun 3, 2016, 3:56:52 AM6/3/16
to Hippo Community
On Fri, Jun 3, 2016 at 7:35 AM, Pradeepa Kadiyala <pradi...@gmail.com> wrote:
Hey!

I think i missed that componentclassname properrty alltogether.  I will go through this and see if I can move any further. Thanks for the inputs.
As for the tutorials we are following them. But since we are new all this is too confusing to be learnt in one go. 
Does Hippo conduct any sessions for organisations? If yes we would love to join the sessions or webinars as our team will have to work on Hippo for quite some time in the future. :)

No worries, there is a lot to learn. We do offer a number of training options. See here:

Of course we are still happy to help you as much as we can on this community group. You should ask whoever is responsible for this in your organization to make contact with Hippo about this.

mvg,
jasper

Pradeepa Kadiyala

unread,
Jun 3, 2016, 6:03:55 AM6/3/16
to Hippo Community
Hey.

Tried implementing the component bean like you suggested. Please take a look at the attachments:
error1.PNG
template_main_ftl.PNG
templateList_hst1.PNG
TemplatesComponent.PNG

marijan milicevic

unread,
Jun 3, 2016, 6:16:58 AM6/3/16
to hippo-c...@googlegroups.com
Hi,

On Fri, Jun 3, 2016 at 12:03 PM, Pradeepa Kadiyala <pradi...@gmail.com> wrote:
Hey.

Tried implementing the component bean like you suggested. Please take a look at the attachments:



I would suggest to follow developer trail [1] to get the concepts right.
Even if you get it working with trial and error approach, you are going to struggle with next problem.

cheers
marijan


Pradeepa Kadiyala

unread,
Jun 10, 2016, 3:02:48 AM6/10/16
to Hippo Community
Hey Marijan!
Thanks Jasper for all your help & Marijan for the link! :)
I am now able to create the documents and connect them to the channel manager.
The only issue that remains now is that i am able to see the images in the Document but when i open the document in channel manager the image is not found.
Any image path related configs specifically for this scenario?
channel_manager_image.PNG
image_in_document.PNG

Jasper Floor

unread,
Jun 10, 2016, 9:43:25 AM6/10/16
to Hippo Community
What does your template look like?

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 10, 2016, 10:27:43 AM6/10/16
to Hippo Community
Hi Jasper,

By template you mean my ftl file ? 

marijan milicevic

unread,
Jun 10, 2016, 10:35:36 AM6/10/16
to hippo-c...@googlegroups.com
On Fri, Jun 10, 2016 at 4:27 PM, Pradeepa Kadiyala <pradi...@gmail.com> wrote:
Hi Jasper,

By template you mean my ftl file ? 

I believe he does. Your document backing java bean might be useful as well  (HST bean where image getter is defined),
cheers
marijan

On Friday, 10 June 2016 19:13:25 UTC+5:30, Jasper Floor wrote:
What does your template look like?

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 10, 2016, 10:46:23 AM6/10/16
to Hippo Community
Hi,

My backing bean (HST Component bean does not have the image)
This image in the above attached files is form an imageset that i have created. In my Document i have used html and img src tags to fetch this image

<table class="row header" style="border-spacing: 0; border-collapse: collapse; vertical-align: top; text-align: left; width: 660px; hight: 74px position: relative; background: #0091d2; padding: 0;">
 
<tbody>
 
<tr align="left" style="vertical-align: top; text-align: left; padding: 0;">
 
<td align="left" class="six  sub-columns last" style="text-align: left; vertical-align: middle; word-break: break-word; min-width: 0px; width: 50%; margin: 0px; padding: 22px 0px 20px 30px; border-collapse: collapse !important;" valign="middle"><font color="#ffffff" face="Together Regular, Helvetica, Arial, sans-serif"><span style="font-size: 34px; line-height: 17px;"><b>Confirmed Order</b></span></font></td>
 
<td align="right" class="six sub-columns" style="word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; text-align: left; min-width: 0; width: 50%; color: #222; font-family: Helvetica,Arial,sans-serif; font-weight: 400; line-height: 19px; font-size: 14px; margin: 0; padding: 10px 20px 10px 0;" valign="top"><img align="right" alt="" data-facetselect="781fddc2.logo-telenor.png/{_document}/hippogallery:original" data-type="hippogallery:original" data-uuid="bcab6ac6-2c39-49aa-838e-567023ca8a14" src="binaries/content/gallery/myhippoproject/telenor/781fddc2.logo-telenor.png/781fddc2.logo-telenor.png/hippogallery:original" /></td>
 
</tr>
 
</tbody>
</table>


And my image telenor/781fddc2.logo-telenor.png is stored in the imageset under MyHippo project/Telenor

Pradeepa Kadiyala

unread,
Jun 10, 2016, 11:00:22 AM6/10/16
to Hippo Community


Attaching my ftl file content :

<#assign hst=JspTaglibs["http://www.hippoecm.org/jsp/hst/core"] >
<html>
    <head>        
    </head>
    <body>
    <#if document??>
    <h3><b>Template ID: ${document.id?html} </b></h3>
    <br/>
    <br/>
   
    <div>
      <@hst.html hippohtml=document.header />
    </div>
    <div>
      <@hst.html hippohtml=document.customerdetails />
    </div>
    <div>
      <@hst.html hippohtml=document.products />
    </div>
    <div>
      <@hst.html hippohtml=document.specificmessage />
    </div>
    <div>
      <@hst.html hippohtml=document.footer />
    </div>
    <#else>
      <h1>Goodbye? cruel world</h1>
  </#if>
    </body>        
</html>

 

Jasper Floor

unread,
Jun 13, 2016, 7:11:56 AM6/13/16
to Hippo Community
What happens when you try to get the image directly?

This url "binaries/content/gallery/myhippoproject/telenor/781fddc2.logo-telenor.png/781fddc2.logo-telenor.png/hippogallery:original" doesn't seem quite right. I would expect it to be an absolute path. You say you use html and img tags. According to your ftl the filed is a hippo html field. So that would mean Hippo is responsible for creating those links. Presumably you then have an html field to which you added the image through the CKEditor/Hippo image picker. Maybe there is a misconfiguration somewhere?

Sorry that I can't identify exactly what the problem is. 

mvg,
Jasper

Pradeepa Kadiyala

unread,
Jun 14, 2016, 5:00:07 AM6/14/16
to Hippo Community
Hey Jasper,

Thanks for your response.
So that would mean Hippo is responsible for creating those links -- yes this was the thing.. in my document type instead of using the img tags directly i tried using the image picker available inside the rich text editor and eureka! i am now able to see my images inside my document preview.

Now just 1 more problem (Sorry for bugging you for so long :-()

I have n number of documents under a single folder (say for eg. under folder named templates i have docuemtns named Template1, Template2, Template3) All these documents have the same document type. I do not want to create separate pages for every document. Can i reuse the ftl i prepared for all the documents?
Or somehow get the documents under the same folder to redirect to the same ftl ?

I tried referring the Hippo Guide for this but could not find the suitable link. Can you please help?

Pradeepa Kadiyala

unread,
Jun 14, 2016, 6:46:46 AM6/14/16
to Hippo Community
Hi Jasper,

I figured the way out for my problem with some further research and studying Hippo :-)
Thanks for all the continuous support. :-)

Jasper Floor

unread,
Jun 14, 2016, 7:24:02 AM6/14/16
to Hippo Community
Glad to hear you solved it. We are happy to help as well. Hope to see your continued presence here. Soon you will be the one answering questions ;)

mvg,
Jasper

Reply all
Reply to author
Forward
0 new messages