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
URL Params #1532
Comments
Well, static websites don't have a means of reading the url, outside of Javascript. I'd caution against it, as it would only work in dev mode and hosting a dev mode site isn't going to be very fast. What is your use case? |
Although I also just dump static content, most of my pages render extra sections with notes, ideas and some info ala rails footnotes... that are only visible in development. Mostly I just wanted an easy way to switch between the development and production rendering by adding en environment variable |
Ah, cool. let me think on this |
I find convenient having However since I use dnsmasq for custom dev domains, I am starting to think that it would be even more convenient using a prod/dev subdomain. That way I could easily switch the middleman server environment in a way that persists after clicking on links. |
@tdreyno I will not change the topic of this issue, but I have been exploring using subdomains instead url params. This is my ideal setup to access middleman: mysite.dev (defaults to development mode) Is there any easy hack to access the domain so I can build my env helpers around them? |
@fgarcia That's the primary question. Should we expose our web server environment to Middleman, like we did in v3. I think you've convinced me, but I need to think about the API |
if missuse is an issue, what about exposing it only to extensions? That way people will think twice about the reasons of not being exposed in the normal environment along other helpers. |
Ok, added as:
In template/helper context. |
I have seen that in v4 the
request
helper method was removedWhat are the alternatives to access the url params while rendering a template?
The text was updated successfully, but these errors were encountered: