Hi Will,
Will Carpenter schrieb:
> Hey,
> I'm trying to add a re-order option for a list of items in a CMS. I'm
> trying to use the :move method with replace set to true, and am using
> :order before and :order after to indicate which direction to shift the
> affected node. I have pasted an example of one of my generated forms below:
>
> <form action="/content/site/jcr:content/herobanners/spread_tv"
> method="POST" enctype="multipart/form-data">
> <input type="hidden"
> name=":operation" value="move" />
> <input type="hidden" name=":dest"
> value="./" />
> <input type="hidden" name=":replace"
> value="true"/>
> <input type="hidden" name=":order"
> value="before /content/site/jcr:content/herobanners/comedy_roadtrip" />
> <input type="hidden"
> name=":redirect" value="/content/site.html"/>
> <input type="submit" value="Up"/>
> </form>
>
> I have attached a screenshot of the error I get when I try to hit the
> "Up" form shown above. Although it says that it can't find the path,
> the path does in fact exist. Any ideas?
Unfortunately, the screen shot didn't make it to the list.
Yet, here are some hints: Instead of using a move operation, you may use
the default (modify operation) and the argument to the "before" command
is a simple name.
So to order the /content/site/jcr:content/herobanners/spread_tv before
comedy_roadtrip, you may do as simple as:
<form action="/content/site/jcr:content/herobanners/spread_tv"
method="POST" enctype="multipart/form-data">
<input type="hidden" name=":order"
value="before comedy_roadtrip" />
<input type="hidden" name=":redirect"
value="/content/site.html"/>
<input type="submit" value="Up"/>
</form>
or in curl-speak:
$ curl "-F:order=before comedy_roadtrip" \
http://host/content/site/jcr:content/herobanners/spread_tv
Both call the modify operation, without actually modifying anything,
except for moving the spread_tv above comedy_roadtrip
Hope this helps.
Regards
Felix