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

Question: Can I render with absolute links #148

Closed
thangma opened this issue Apr 8, 2022 · 2 comments
Closed

Question: Can I render with absolute links #148

thangma opened this issue Apr 8, 2022 · 2 comments
Labels

Comments

@thangma
Copy link

thangma commented Apr 8, 2022

Hi,
I need to render absolute links so Is there any config for this? or please give me a guide to do!
image

Thanks & Best Regards,
Thang Mai

@Shazwazza
Copy link
Owner

Out of the box I'm unsure if there's a specific option to set a base path for a bundle. I'd have to go check for that but having a look at how the URL renders it doesn't look like there's an option for it:

public string GetUrl(string bundleName, string fileExtension, bool debug, string cacheBusterValue)

One way for now would be to replace the default Smidge DefaultUrlManager with your own implementation in DI. You can inherit from DefaultUrlManager and then explicitly implement the DefaultUrlManager.GetUrl method (which will override the default implementation).

@thangma
Copy link
Author

thangma commented Apr 12, 2022

Hi @Shazwazza! This solution works for me.
Thanks!

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

2 participants