2009年10月14日星期三

Re: [fw-mvc] View helper HeadScript

Do you mean a view helper or an action helper? They are different things.


It is depending on what your use case is. You might solve the problem by using a placeholder. The view helper is instantiated before you actually display the output. But that might not be the best solution (and I think it's using the wrong tool for the job). You might be able to access the headScript helper and add the file inside your action controller or add the script during the rendering of the view for your controller action.


Regards, Jurian
--
Jurian Sluiman
Soflomo.com


Op Wednesday 14 October 2009 16:40:22 schreef Ed Lazor:
> Hi =)
>
> > But Ed, I think you're having the problem because the view helper
> > headScript() is used first and then you're adding some more files. It's
> > something which isn't clear from your mail, but it might be the problem
> > (I have dealt with that mistake many times ;) ).
>
> Jurian, that's exactly what the problem was. I was thinking of
> switching to using a view action helper, but that might still have the
> same timing issue. How do you usually solve this problem?
>
> -Ed

没有评论: