Welcome Guest, Not a member yet? Register   Sign In
Determining which module to load with Matchbox modules
#1

[eluser]PeteZahut[/eluser]
Suppose you have this url: http://www.somedomain.com/somename/

I'd like to determine which matchbox-module to load based on the "somename" segment. The segment is checked against the database where the type is pulled:

"select type from content where uri = 'somename'"

if the type is "page", go to the page-module and load "show_page" with seg 1 as value
if the type is "form", go to the form-module and load "show_form" with seg 1 as value
if the type is "module", go to the module using the name in segment 1 and load "index"

I know you can achieve this with custom routes, but how can this be achieved without specifying the custom routes?


Messages In This Thread
Determining which module to load with Matchbox modules - by El Forum - 05-12-2008, 07:26 AM
Determining which module to load with Matchbox modules - by El Forum - 05-12-2008, 07:38 AM
Determining which module to load with Matchbox modules - by El Forum - 05-12-2008, 07:58 AM
Determining which module to load with Matchbox modules - by El Forum - 05-12-2008, 08:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB