1 to 8 of 8
I have re-read ticket 64 only to find out it is meant for 0.9 and not 0.8.
Is there another way to do this or this can only be achieved in version 0.9 of Akelos?
Thank you.
I got it to work. Seems like ticket 64 is suffering a bit from cut-and-paste from a different tutorial
Follow the first two steps but when you edit app/views/book/listing.tpl
do it like below
{loop books}
<tr {?book_odd_position}class="odd"{end}> // <-- After this line
<td>{book.author.name?}</td> // <-- Insert this line
{loop content_columns}
And if you want a Column header for that, you'll need to do something like this:
<?php $content_columns = array_keys($Book->getContentColumns()); ?> // <-- After this line
<th scope="col">Author</th> // <-- Insert this line
Or you cand do the same, just with sintags:
<th scope="col"><%= sortable_link 'Author', { :sort => 'author_id' } %></th>
{loop content_columns}
<th scope="col"><%= sortable_link content_column %></th>
{end}
In my opinion, i'ts often much more easy to read html where you use sintags to use the helpers, than php. It shouldn't give any performance difference anyways, since it is "compiled" and cached until you change it.
1 to 8 of 8