default document values set via hippostd:modify in new document creation query

65 views
Skip to first unread message

schi...@gmail.com

unread,
Oct 17, 2014, 2:04:03 PM10/17/14
to hippo-c...@googlegroups.com
Hi, two questions for this field:

1) is there a way to set values of child nodes using hippostd:modify in new document creation query?
for instance, if my doc has custom compound, or a rich text field - how can i provide the path for the field to be set?
say i have string field 'title' and rich text field called htmlTitle, and i want to prepoulate them both, so i have:

<sv:property sv:multiple="true" sv:name="hippostd:modify" sv:type="String">
    <sv:value>./element(*,myhippoproject:htmlTitle)/hippostd:content</sv:value>
    <sv:value>$name</sv:value>
    <sv:value>./myhippoproject:title</sv:value>
    <sv:value>$name</sv:value>
  </sv:property>

the title gets set, but the htmlTitle does not. I have also tried: ./myhippoproject:htmlTitle/hippostd:content and ./myhippoproject:htmlTitle//hippostd:content....
help?

2.what are the parameter fields available here? i see $name and $now and $holder. what other options are there? Is there a way to get the 'translated' node name? as in 'My Node' not 'my-node'?  ?

Thanks!

schi...@gmail.com

unread,
Oct 20, 2014, 10:46:56 AM10/20/14
to hippo-c...@googlegroups.com, schi...@gmail.com
sorry to bump, but...

is 1. possible with xpath & hippostd:modify? - i'll keep trying to figure it out if it is

thanks!!!!

Minos Chatzidakis

unread,
Oct 21, 2014, 5:43:38 AM10/21/14
to hippo-c...@googlegroups.com, schi...@gmail.com
Hi,

I'm not sure this is documented.. but here is a method in the FolderWorkflow where this information is parsed:
org.hippoecm.repository.standardworkflow.FolderWorkflowImpl#populateRenames

Perhaps if you debug this you'll find why your attempts are not working.

HTH,
Minos
--

--
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.



--
With kind regards/Met vriendelijke groet,
Minos Chatzidakis

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

schi...@gmail.com

unread,
Oct 21, 2014, 4:46:40 PM10/21/14
to hippo-c...@googlegroups.com, schi...@gmail.com
Thank you, Minos, IDH...

i got it working for the most part by using:
"./_name/hippostd:content"
or
"./_name/myhippoproject:[compound.property]

sadly there's no way to provide the full path, as the interperpreting code only looks at the last path segment when matching renames...so for custom compounds, as long as all proprty names are uniqu, this works a treat, but for rich text fields - they're all "hippostd:content"...

Any clues on how to use the translated node name in place of the url escaped $name?


Thank you!!!!
Reply all
Reply to author
Forward
0 new messages