If you look at the taglibs in cookbook, you find this tag: http://cookbook.hobocentral.net/api_tag_defs/or-cancel If you look at the source, you can see that the <or-cancel> tag take parameters.
Then: I recommend going through the Agility tutorial in detail and try to understand what is going on: http://cookbook.hobocentral.net/tutorials/agility. Agility tutorial has an example of replacing/adding a cancel button inside a app/view/xxx/edit.dryml <edit-page> <form:> <cancel: with="&this.story"/> </form:> </edit-page> This may be a bit confusing, since <cancel: xx> is not <or-cancel> to explain what happens inside the edit.dryml page, the <edit-page> tag will "run" your default edit-page tag for the model, which by default is stored inside app/view/taglibs/auto/rapid/pages.dryml (like <def tag="edit-page" for="your model">) This <edit-page> tag then again calls the app/view/taglibs/auto/rapid/ forms.dryml. If you look inside that file, you will see that the <or- cancel> takes a param called cancel:. There is the link between <or- cancel> and <cancel:>. <cancel:> is the paramteter given to <or- cancel> tag, like a procedure or function when programming. .. Back to your case, you should then pass the object that you want user to be redirected to (for instance: &this.parent_object) Also reading the DRYML guide will brighten your day, at least it did it for me. Hope this helps you along /MartOn On Apr 14, 4:29 pm, Clarksta <[email protected]> wrote: > Hi, havent been using Hobo for long so please bear with me. > > I'm having trouble with the cancel button/link, from any new-page, > going to the home page. I'd like it to go to the previous page. > > I'm using auto actions in the controller so that when a table of items > are shown in the show-page of the parent, a new item can be created > from that page. > > So for the show-page of Project for example, a table of reviews are > shown via table-plus : > > <collection: replace> > > <table-plus with="&@reviews" > fields="this,type,activity,rating,status"> > <empty-message:>No reviews match your criteria</empty-message:> > </table-plus> > > </collection:> > > I tried editing the new.dryml with no joy. (Its not used by the > auto_actions_for) > I can see the pages.dryml has a generated tag for the "new-for-project- > page" but I cant seem to provide the cancel param to the form in this > page. > > Am I even looking in the right place ? > > Thanks for any pointers. > > Clarksta --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
