Re: Access to has_a data from Template?

[prev] [thread] [next] [Date index for 2004/09/22]

From: Richard Clamp
Subject: Re: Access to has_a data from Template?
Date: 19:28 on 22 Sep 2004
On 16 Sep 2004, at 20:19, Jesse Sheidlower wrote:
> One that I will instantiate, if necessary, because it is related
> to my book object.

But, in your example, [% book %] is not a book object, it's your book 
class.

Going back to your original example, you want to rework it like so:

[% USE book_class = Class("MyLibrary::Book") %]
[% SET book = book_class.retrieve("99") %] # or something

Then you can work with your book object.

>> Then why are you working with the Book class?
>
> Because the main thing here is that I have a book object, with a
> bunch of columns (some of which may belong to other classes
> related to book).

But you didn't have an object, just a handy class proxy.


        -- 
        Richard Clamp <richardc@xxxxxxxxx.xxx>

(message missing)

Access to has_a data from Template?
Jesse Sheidlower 11:28 on 16 Sep 2004

Re: Access to has_a data from Template?
Tony Bowden 17:30 on 16 Sep 2004

Re: Access to has_a data from Template?
Jesse Sheidlower 17:39 on 16 Sep 2004

Re: Access to has_a data from Template?
Tony Bowden 19:02 on 16 Sep 2004

Re: Access to has_a data from Template?
Jesse Sheidlower 19:19 on 16 Sep 2004

Re: Access to has_a data from Template?
Tony Bowden 22:23 on 16 Sep 2004

Re: Access to has_a data from Template?
Charles Bailey 23:31 on 16 Sep 2004

Re: Access to has_a data from Template?
Richard Clamp 19:28 on 22 Sep 2004

Re: Access to has_a data from Template?
Jesse Sheidlower 18:09 on 16 Sep 2004

Re: Access to has_a data from Template?
Edward J. Sabol 19:01 on 16 Sep 2004

Re: Access to has_a data from Template?
Clayton L. Scott 21:25 on 16 Sep 2004

Re: Access to has_a data from Template?
Jesse Sheidlower 13:38 on 17 Sep 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52