Our Forums are now closed. Please go to our Google Mailing List for help. This site will remain open for historical purposes.
ColdBox Framework Forums Home | Profile | Search | Login | RSS

 pdf Print PDF   Previous Page  Page: 1   Next Page

Thread: problems with event.BuildLink in Coldbox
Created on: 06/04/10 04:31 PM Replies: 0
faheem7860
Newbie

Joined: 04/13/10
Posts: 9
problems with event.BuildLink in Coldbox
06/04/10 4:31 PM

Hi I am having trouble using event.BuildLink in coldbox.

Hi I am wondering if there is a way to regenerate the URL when any page is loaded in coldbox when using event.buildLink ?

Currently I get http://cawksd05.codandev.local:8080/entries/editor when using event.buildlink.

But the correct url should have /index.cfm added to it as shown below:

/index.cfm/entries/editor

Is there a way to set this once and where does this get set as I am confused where to set this for all my pages so that /index.cfm gets added the the url prefix when I do an event.Buildlink.

Please see my code for the routes.cfm below:

// General Properties setUniqueURLS(false);
setAutoReload(false);

// Base URL
if( len(getSetting('AppMapping') ) lte 1){
setBaseURL("http://#cgi.HTTP_HOST#/index.cfm";);
}
else{
setBaseURL("http://#cgi.HTTP_HOST#/#getSetting('AppMapping')#/index.cfm");
}

// Your Application Routes
formatConstraints = {format="(xml|json)"};

addRoute(pattern="/api/:format/tasks/completed",handler="tasksAPI",action="list",constraints=formatConstraints,completed=true);
addRoute(pattern="/api/:format/tasks",handler="tasksAPI",action="list",constraints=formatConstraints);
addRoute(pattern="/api/:format?",handler="tasksAPI",action="invalid");

addRoute(pattern="/tasks/list/:status?",handler="tasks",action="index");
addRoute(pattern=":handler/:action?");
Link | Top | Bottom

Galleon Forums V1.7.008 was created by Raymond Camden