clubstudio / craft-asset-rev

A Craft CMS plugin to help with cache busting
MIT License
109 stars 7 forks source link

Make Alias that is available in the be #33

Closed Metis77 closed 8 months ago

Metis77 commented 1 year ago

Any why to add an @alias from the manifest, that is available in the backend?

So we could create our own alias like @backend_css and use it in an plugin like "Control Panel CSS"(https://plugins.craftcms.com/cp-css).

scottwakefield commented 1 year ago

Hi @Metis77,

Can you explain a little more about what value you'd add to Control Panel CSS and where? I'm not sure I 100% follow.

Let me know some more details and I'll see if there's anything we can do 👍🏻

Metis77 commented 1 year ago

I would like to have the assets url resolved an stored to an alias, that we could use anywhre in the craft CP.

That way we could use it for example together with https://plugins.craftcms.com/cp-css. Something like that:

Bildschirmfoto 2023-10-05 um 22 55 27
scottwakefield commented 1 year ago

Thanks, @Metis77.

That's not something the plugin can handle I'm afraid.

But, you could look at creating a small module that uses:

https://github.com/clubstudioltd/craft-asset-rev/blob/c4c6e6d11d79ede75a9a2751b248c042fe5ac763/src/services/AssetRev.php#L22

to grab what you need from the manifest file and then assign it to an alias. That could work.