I have created a custom image set by following the documentation:
http://www.onehippo.org/library/concepts/images-and-assets/create-a-custom-image-set.html
Completed with no errors, now I have a custom image set with three sets:
1: hippogallery:thumbnail
2: hippogallery:original
3: mycompany:preview (added)
In the CMS it work (three sets), but not on the JSP
I have created a Custom Resource Containers. documentation:
http://www.onehippo.org/library/concepts/images-and-assets/custom-resource-containers.html
I have created an customResourceContainers.xml in a the Site project folder META-INF/hst-assembly/overrides/
If I upload a new image in the cms I get the image in three sets.
In the JSP:
<c:choose>
<c:when test="${hst:isReadable(document, 'officeImage.thumbnail')}">
<hst:link var="img" hippobean="${document.officeImage.thumbnail}" />
<img src="${img}" title="${fn:escapeXml(document.officeImage.fileName)}" />
</c:when>
<c:otherwise>
no image
</c:otherwise>
</c:choose>
Result JSP
1: new image with tree sets: no image
2: old image with two sets: thumbnail image
What do I miss or what do I do wrong?
Hope te see comments.
@Node(jcrType = "mycompany:myimageset")
public class MyCompanyImageSetBean extends HippoGalleryImageSet {
public HippoResourceBean getPreview() {
return getBean("mycompany:preview");
}
}
public MyCompanyImageSetBean getOfficeImage() {
return getLinkedBean("yourcompany:officeimage", MyCompanyImageSetBean.class);
}
Leo,
Thanks for you quick response.
I did not had this code (was not in the documentation), I added and tested it but it does not fix the problem.
I personally think there is something wrong in the customResourceContainers.xml file.
--
*** The 2014 Hippo GetTogether will take place on May 16 in Amsterdam, register at http://hgt14.onehippo.org ***
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 a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/t6MuwHdzmSA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
I tested something.
I added an image in the rich editor text an used the next code:
<hst:html hippohtml="${document.textBanner}">
<hst:imagevariant name="mycompany:preview"/>
</hst:html>
This worked I got the preview image.
Still not as a single image of the type MyCompanyImageSetBean.
I may be wrong, but for me the resource container configuration is only here to make the url to download the images "more beautiful " (eg. /binaries/preview/content...)
yes indeed this is not in the documentation, I think they should add it since it is pretty important if you want to use the new image set in your own beans.
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 http://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-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 http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Hey Jeroen,
I know what you have said, I mean something else.
In my previous posts I explained it.
I want to have the ‘preview’ image of the MyCompanyImageSetBean (original, thumbnail and preview )
I tried this with the next code:
<c:choose>
<c:when test="${hst:isReadable(document, 'officeImage.preview')}">
<hst:link var="img" hippobean="${document.officeImage.preview'}" />
<img src="${img}" />
</c:when>
<c:otherwise>
no image
</c:otherwise>
</c:choose>
I get a result in the jsp: ‘no image’.
So I find it is weird it does work with:
<hst:html hippohtml="${document.textBanner}">
<hst:imagevariant name="mycompany:preview"/>
</hst:html>
But not in the jsp as an object of MyCompanyImageSetBean.
Cheers,
Arsdeep
I went in the debug mode and I found that then bean in not null but the attribute of the object type MycompanyImageSetBean is null, but I don't know why.
Does someone have any idea?
In the bean I use:
public MycompanyImageSetBean getTestImage() {
return getLinkedBean("mycompany:imagelink", MycompanyImageSetBean .class);
}
Cheers,
Arsdeep
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 http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
--Jeroen Reijn
Hippo
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 101 Main Street, Cambridge, MA 02142
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
http://about.me/jeroenreijn
--
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.
The bean package was added automatically in the web.xml
I used a different package for the custom image set.
--
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 a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/t6MuwHdzmSA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
The bean package was added automatically in the web.xml
I used a different package for the custom image set.