Skip to content

Commit

Permalink
fixed routing
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Mar 27, 2023
1 parent f504843 commit 54dbc5a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions ModuleConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ component {
// module settings - stored in modules.name.settings
settings = {};

// Home Route
router.route( "/" ).to( "Home.index" );

// Layout Settings
layoutSettings = { defaultLayout : "Main.cfm" };
}
Expand Down
10 changes: 5 additions & 5 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"rewrites":{
"enable":"true"
},
"webroot": "test-harness",
"aliases":{
"webroot":"test-harness",
"aliases":{
"/moduleroot/route-visualizer":"../"
}
},
"openBrowser":"false",
"cfconfig": {
"file" : ".cfconfig.json"
}
"cfconfig":{
"file":".cfconfig.json"
}
}
4 changes: 2 additions & 2 deletions test-harness/handlers/Main.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


function index( event, rc, prc ){
return "<h1>Go to the <a href='#event.buildLink( "route-visualizer" )#'>Route Visualizer Here!</a></h1>";
event.setView( "main/index" );
}

}
}
3 changes: 0 additions & 3 deletions test-harness/main/index.cfm

This file was deleted.

3 changes: 3 additions & 0 deletions test-harness/views/main/index.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<cfoutput>
<h2>Go to the <a href='#event.buildLink( "route-visualizer" )#'>Route Visualizer Here!</a></h2>
</cfoutput>

0 comments on commit 54dbc5a

Please sign in to comment.