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.