Added a way to properly load resources in Smarty, closes #1431.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | #1431
| Refs tickets  | ---
| License       | MIT
| Doc PR        | ---

This does *not* use Assetic.
do you want to wait a few days to merge this? :stuck_out_tongue_winking_eye: