I got all the way through the booklink tutorial and got it all to work except getting the authors to show up with the books I got the part where I get the Author drop down when creating the book and can see them properly stored in the database with the books
I am using the tutorial from: http://www.akelos.org/docs/tutorials/booklink
Seems like something wrong in the app/views/book/show.tpl Did I not put the _{Author} line in the right place?
<div class="show">
<?php $content_columns = array_keys($Book->getContentColumns()); ?>
<label>_{Author}:</label> <span class="static">{book.author.name?}</span><br />
{loop content_columns}
<label><?php echo $text_helper->translate($text_helper->humanize($content_column))?>:</label>
<span class="static"><?php echo $book->get($content_column) ?></span><br />
{end}
</div>
If it matters, here is my PHP version info php -v
PHP 5.2.4 (cli) (built: Sep 18 2007 08:50:58)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
I am running on Fedora 7
Thanks!
Author1 book book Author2 book [...]
? the same two models seen from the other side.
in the controller:
$this->authors =& some author-finder including the Books.
in the view:
{loop authors}
and in this loop
{loop author.books}
clearer? wrong direction?
order by a foreign attribute (author.name) is not supported by the paginator-helper.
you have to do it by hand. modify the getFinderOptions and sortable_link
as always: if you find a pattern, share it!
I would like to see a refactored paginator that works more on the level of a model, as a model-extension, because a paginator only restricts the result-set of a find*
a paginator-helper then would only spit out the usual links
1 to 6 of 6