On 14.05.2015 04:11, Justin Hawkins wrote: >> for a while I have been trying to get at the name of the template that >> is just being rendered, to use it in the layout. > > I can’t answer your question directly, but this requirement sounds like > a bit of a code smell. What are you trying to accomplish?
Oh, I understand your suspicion. What I want to have is just an informational comment in the rendered page that says which template has rendered that page, like this: <!-- template v_m_s/domains.html.ep --> As I said, I am a novice with Mojolicious and "serious" web applications, plus my application is (at this stage of development) akind of twisty little maze of pages, of which some are, while not actually redundant, relatively similar. At some point I was actually wondering which template had rendered the page I was looking at, hence that idea. I could easily put that line by hand into each template to achieve the same effent (or even devise a scheme to have that done automatically), but as Mojolicious is great at avoiding boilerplate, I thought it should be able to come up with a generic solution. It is certainly not something that will be needed for production code. Regards, Juergen. -- <[email protected]> Tel +49.30.838-50740 Fax -450740 Zentraleinrichtung fuer Datenverarbeitung, Central Systems (Unix) Freie Universitaet Berlin, Fabeckstrasse 32, 14195 Berlin, DE -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
