On 7 Nov 2008, at 10:33, Zladivliba Voskuy wrote:
Hi everyone,
I can't seem to get dojo to work on a placeholder located in my layout file.
The form is a simple login form that works fine. However when I try to put it in the placeholder the form shows but without dojo applying to it.
Here's an extract :
This doesn't work, on my index.phtml :
$login = new Login();
$this->placeholder('loginbox')->set($login);
Here's the target in my layout file :
<?php echo $this->placeholder('loginbox'); ?>
However this works fine in the index.phtml :
$login = new Login();
echo $login ;
Any idea how do deal with this bug ?
This is just a guess as I'm a YUI man myself but, one possibility is that because the placeholder is being rendered in the layout script whatever call is being made to the dojo view helper is occurring AFTER its stuff has already been added to the <head>. (Thus whatever dojo magic you're after doesn't happen.)
You could use the action stack with a named response segment. (You could cache the output if it were fairly static.)
Hope this helps,
Carlton
没有评论:
发表评论