views:

212

answers:

1

Hi I am developing an application -called smtool- using Groovy and Grails. This application must be integrated to a portal. The portal have the restriction that every link must be relative. No absolute paths are allowed neither for links nor for images, js files, css files, etc.

My application has a menu with many links pointing to different controllers.

For example:

<g:link class="menulink" controller="continuity">Continuity Management</g:link>

this will be compiled to:

<a href="/smtool/continuity/index" class="menulink">Continuity Management</a>

Unfortunately this is not correct and it must be compiled to:

<a href="continuity/index" class="menulink">Continuity Management</a>

Is there any way to get this?

I've tried to change the application name to the empty string in the application.properties file but it didn't help.

Any Idea?

Thanks in advance.

Luis

+1  A: 

Did you see this comment in the grails-app/conf/Config.groovy:

/*
 * default context is protocol://host:port/appName/* It can be changed by
 * setting the grails.app.context here.
 */
//grails.app.context = "/"

That might be what you need.

pmckinstry
Thanks for the advice. I am trying this way.
Luixv