How does asset requiring and providing work?

Permalink 1 user found helpful
In the package controller I registered some assets needed for Zurb Foundation.

In the page_theme.php I require the assets and my stuff is working.

But when I want to tell concrete, that my theme provides these assets using $this->providesAsset() the assets are not loaded and my theme is not working.

When I only provide the assets it's not working, too.

What's the error (I make)?

I'm not very happy with the paths in the on_start() function... Can someone tell me how to get the theme path in the package controller?

Package controller:
https://github.com/core77/foundation_sites/blob/master/controller.ph...
page_theme.php:
https://github.com/core77/foundation_sites/blob/master/themes/founda...

 
andrew replied on at Permalink Best Answer Reply
andrew
You should only providesAsset if your theme provides an asset using a method outside the Concrete5 asset system.

So, if you hard-code a link to bootstrap in your theme (like we do in Elemental) you'll use providesAsset. If you want to use a built-in Concrete5 asset globally in your theme, you can just use $this->requireAsset() from within the page_theme.php class, same as elsewhere.
core77 replied on at Permalink Reply
Thanks! Now I got it :-))