Jump to content

Cake - How to make an inert page (one that doesnt need a controller etc.)


CrimpJiggler

Recommended Posts

I have a number of different database tables of substances (i.e. fungi, compounds, products, taxonomy) etc. and I want to put it all under the umbrella of "substances". I setup prefix routing so I can have URLs like this: /Substances/CompoundsController and it works, but its still using my "substances" table which I want to get rid of, so what I wanna do is have an ordinary page when you go to /Substances/, it'll link to the different substance pages, but I can't have it looking for a substances model, controller and views. Heres the my core.php file:

Configure::write('Routing.prefixes', array('admin','Substances')); 

and heres what I started adding to the routes file:

Router::connect('/Substances/', array('controller' => 'Substances', 'action' => 'index'));
Router::connect('/Substances/Compounds/', array('controller' => 'Substances', 'action' => 'index','Compounds')); 

the problem there is I'm telling it that theres a Substances controller, so its gonna look for a controller, a model and views etc. What I need is a place page for /Substances/, the controllers will be for the /Substances/Compounds and stuff like that. Is there a way I can turn this into a regular page?

 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.