Zend Framework 2 add simple mode Assets

Asked

Viewed 108 times

0

Good afternoon guys, I’ve been working with Zend for a long time and I’m structuring a project with Zend 2. I just discovered that to add a simple css file out of the public/css folder I have to install a whole module and I’m simply baffled. Are you serious about this? There’s another way to do it without that master gambit?

http://www.razko.nl/blog/2013/01/21/managing-assets-in-zend-framework-2/

In this link I have 3 solutions and I found none of them viable, what do you say? Thank you very much.

1 answer

1


Zend indicates to use a directory structure where each module has its own folder public with the Assets, but it does not solve how to make these files available.

You can simply play your Assets inside the server’s public folder and be happy if you don’t want to follow this structure.

If this isn’t working, you have to change something in your *.htaccess, according to the code that comes in Skeleton this is the default behavior, see the code on the link https://github.com/zendframework/ZendSkeletonApplication/blob/master/public/.htaccess .

If you want to leave the public inside the module, I recommend installing the Asset manager of your link. It is not something complicated, just declare in Composer.json and give a php composer.phar update, after that is to make the settings described in the link you passed.

  • Good evening. After researching a lot I ended up putting an Asset manager and everything worked very well... I think it was more the fright of seeing the thing change so drastically even... khaskhhkas Thank you very much.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.