Load different data depending on URL? |
[eluser]invision[/eluser]
Thanks for the reply TG. I'm using your code for the Controller, but sadly this just loads 'category' when I access any scenario of the URL (see post #3). Is there a cleaner way of doing this? Am I making it too complicated? Thanks again for all your help.
[eluser]invision[/eluser]
Do you need me to provide you with any other files to help diagnose the issue? My Routes file is (snippet): Code: $route['default_controller'] = "main";
[eluser]Alexandru M.[/eluser]
Maybe this will work (did not try it tough) : Code: if($param1 && $param2 && $param3) This way only one type of information will be shown (I think).
[eluser]invision[/eluser]
Need to dash out just now. That also didn't work Alexandru Will come back soon and try again
[eluser]tonanbarbarian[/eluser]
try this Code: function index($param_1 = FALSE, $param_2 = FALSE, $param_3 = FALSE) { add the following as the first statements for the function Code: echo $param_1.'::'.$param_2.'::'.$param_3.'<br />'; the url should probably be http://www.site.com/index.php/[controller]/index/scotland/glasgow/hotels/ [controller] because i do not know what the controller is
[eluser]invision[/eluser]
Thanks for the reply and apologies for my delay. That doesn't seem to work either. When I try to echo those I get: Code: Severity: Notice The Controller is [b]main[b]. Thanks again for your assistance. I've got a feeling I've perhaps missed something uber obvious.
[eluser]tonanbarbarian[/eluser]
so try going to the url http://www.site.com/index.php/main/index...ow/hotels/ and see if that works
[eluser]invision[/eluser]
http://localhost/ae/index.php/main/index...ow/hotels/ This still shows 'country' http://localhost/ae/index.php/main/index...d/glasgow/ http://localhost/ae/index.php/main/index/scotland/ also both show 'country' Thanks again for your help.
[eluser]invision[/eluser]
I don't think it's recognising my param_1's at all Even visiting: http://localhost/ae/index.php/main/ still shows 'country'
[eluser]WanWizard[/eluser]
You can't echo them in the template, they are not defined as template variables. Echo them (or better, use var_dump) in the index() method of the controller. |
Welcome Guest, Not a member yet? Register Sign In |