Reputation: 4637
Hello can somebody write or point to a good symfony plugin installation tutorial. Here is the problem, I have a symfony 1.2 application and I'm trying to install the LightWindow plugin, which run on Prototype.
The thing is: I dont have PEAR installed, and due to proxy limitations I don't think I can, but there is a way to install symfony plugins, which is copying it in the plugins folder, enabling it in the application's config file and running plublish assets, I did all that successfuly and plugin still won't run. Here is a small piece of the code I'm using in the layout:
<?php use_helper('LightWindow'); ?>
.
.
.
<?php foreach ( $secImages as $image ): ?>
<div class="image-slot">
<?php echo lw_image(image_tag(sfConfig::get('app_image_vo_dir') . $image->getPhoto()),
sfConfig::get('app_image_vo_dir') . $image->getPhoto()); ?>
</div>
<?php endforeach ?>
Hope anybody can help.
Also this code doesn't run directly in the layout, the main layout includes it using Ajax
[EDIT]
It works in non ajax environment, but when I try to run it using ajax, it doesn't work, I suspect that the problem is that the LightWindow script checks for a tags on document ready, and since this content is loaded via ajax, it doesn't sees it!
Changing to a non aJax environment is not possible, since is the way my client wants it, besides, no ajax in 2010? almost sci-fi! :)
Any help will be terrific!
Upvotes: 3
Views: 421
Reputation: 36191
lw_image() helper adds required javascript and css assets to the response. As you make ajax requests those are added to the ajax response.
Firstly browsers wouldn't handle it. Secondly, it's not returned by symfony in head section anyway as ajax response is not decorated with the layout.
To process javascript/css files you have to add it to the page which makes ajax calls.
Upvotes: 1