I have the following routes
GET {company}.dev.alvazan.com/test Web.test
GET {company}.dev.alvazan.com/samplepage Web.samplePage
I can go to xxxx.dev.alvazan.com/test just fine UNTIL I add a reference to samplePage.html like so....
<a href="@{Web.samplePage()}">TRY ME</a>
and of course that is because the method is really Web.samplePage(String company) so that a user can go directly to that web page...but I try changing to one of theses and it doesn't work either...
<a href="@{Web.samplePage('${company}')}">TRY ME</a>
<a href="@{Web.samplePage(${company})}">TRY ME</a>
How does one make sure the Web.samplePage is correct in the href above in the html???
thanks, Dean
Because you have already specified the @ symbol, you don't need to then use the $ symbol, as the groovy compiler is at that point expecting code. So, assuming
company
has been passed into the view from the controller, you should be able to do...