[Hippo-cms7-user] Re: Webpage Modification...

Jeroen Reijn j.reijn at onehippo.com
Fri Jun 25 09:02:23 CEST 2010


Hi,

if you're using the HST, there is a specific method for this:

    public HippoHtml getBody() {
        return getHippoHtml("myproject:body");
    }

Cheers,

Jeroen

On Fri, Jun 25, 2010 at 8:07 AM, Dev Vale <Xilv3r at gmail.com> wrote:

>
> Hi Again,
>
> Well seems I managed to figure out this problem as well, wasn't looking
> closely at the CND, which was the problem,
> myproject:body is a "childnode" so the code written can't find any property
> named : myproject:body
> to solve the problem the code needed is:
>
> HippoBean maindocument = getContentBean(request);
> List documentchild = maindocument.getChildBeansByName("myproject:body");
> HippoBean getBody = (HippoBean)documentchild.get(0); //<-- assuming your
> CND
> looks like mine else 0 might be a different number, HippoBean must be cast
> as the list item is an Object.
> String setBody = getBody.getProperty("hippostd:content");
>
> Using the above I was able to obtain the body of the document. I am not
> sure
> weather or not this is best practise however for now it allows me to
> continue.
> Regards
>
>
> Dev
> --
> View this message in context:
> http://hippo.2275632.n2.nabble.com/Webpage-Modification-tp5191446p5220815.html
> Sent from the Website Development mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onehippo.org/pipermail/hippo-cms7-user/attachments/20100625/c358f5c9/attachment.htm>


More information about the Hippo-cms7-user mailing list