It's actually quite a bit easier with dryml (once you get the basics
down).
If @sites is already your context, you can do something like this:
<table fields="this,siteurl">
<controls:>
<a action="shop">Shop!</a>
</controls:>
</table>
what that does, it puts the show link on the name. to get it the way
you had, just change 'this' to 'name' and add a <a>Info</a> to your
controls section.
if @sites isn't the context, just add a with="&@sites" to the table
call.
all this info I pulled from the table taglib page (http://
cookbook.hobocentral.net/api_tag_defs/table) and memory so might have
a mistake or two.
On Feb 3, 11:29 pm, Greg <[email protected]> wrote:
> I am a newbie to Hobo and I am trying to create a list of items that
> have links back to actions while preserving the id of the record. In
> standard rails I was able to achieve this easily (index.html.erb
> below) but I'm confused on how to modify cards to achieve this end
> result:
>
> <h1>Sites</h1>
> <table>
> <% @sites.each do |site| %>
> <tr><td><%=h site.name %></td><td><%=h site.siteurl %></td><td><%=
> link_to "Info", :controller => "site", :action => "show", :id=>site.id
> %></td><td><%= link_to "Shop!", :controller => "site", :action =>
> "shop", :id=>site.id %></td></tr>
> <% end %>
> </table>
>
> Hope someone can point me the right direction. Thanks!
--
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.