Hi Łukasz!

I had the same problem as You, but I am using PHPTAL with Kohana Framework. There are an ORM models, which are representing tables in database, this handles also relationships, for example: I have User_Model object in $user, then when I want to get all his comments, i use: $user->comments :-) But in PHPTAL templates "user/comments" doesn't work, only "php: user.comments", as in your case.

To handle also ORM relations via PHPTAL templates, I modified phptal_path function in PHPTAL/Context.php, I added there just:

if ($base instanceof ORM) {
    $base = $base->$current;
    continue;
}

And now ORM relations works correctly, so in Your case you have to enable equivalent of ORM models in Doctrine :-)


Cheers!
Szymek

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to