Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach external assets #106

Open
sparrowek opened this issue Mar 25, 2014 · 3 comments
Open

Attach external assets #106

sparrowek opened this issue Mar 25, 2014 · 3 comments
Labels

Comments

@sparrowek
Copy link

sparrowek commented Mar 25, 2014

I have a certain problem - I would like to attach an external asset that cannot be stored locally (i.e. cached on disc) e.g. google maps API which checks internally if it is loaded from google site.

In other words I cannot make an asset like this:

'route_name => array(
   '@google_maps_js',
),

I can of course add it normally using view helper in an phtml file - as if I was not using an asset manager at all but an idea come to me why not make an entry like that:

'route_name => array(
   'http://google/api.js,
),

that is without a "@" mark in front to have an asset not stored locally but only used by a ViewHelperStrategy to inject into the page.
Other solution would be to have an option for a normal asset (with @) that forces an asset to always load externally?

@widmogrod widmogrod added the todo label Apr 1, 2014
@jarrettj
Copy link

jarrettj commented Jun 5, 2018

+1

@widmogrod
Copy link
Owner

Hi @sparrowek,

I made small style adjustment, to make the issue description more readable, I hope you don't mind it.

I like your idea of including remote assets by simply declaring absolute URL schema 👍

'route_name => array(
   'http://google/api.js,
),

I will gladly accept your PR, that brings this feature to this project.
Short guideline on contribution to this project, you can find here:
https://github.com/widmogrod/zf2-assetic-module/blob/master/CONTRIBUTING.md

@jarrettj
Copy link

jarrettj commented Jun 7, 2018

For now // works and I'm cool with that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants