Really simple question: How to use calendar on home controller? |
[eluser]victorche[/eluser]
Let me explain ... I want to have a calendar on the index page, in my case, this is the welcome controller. And I want this calendar to have prev/next month links. When I click on the next month for example, I want the url to be: http://example.com/2011/03 And I want there the same index (welcome controller), only with the new month displayed. And I am doing it like this: Code: function index($year = NULL, $month = NULL) Anyway, I am using CI without index.php in the urls. I mean, it is removed in the config and it is removed also with .htaccess. But this simple thing is not working... When I click on the prev/next month, it gives me 404 error. I tried with the routes option, but again no success. Any ideas?
[eluser]Cristian Gilè[/eluser]
Code: http://example.com/2011/03 This is a valid URL: Code: http://example.com/welcome/index/2011/03 Cristian Gilè
[eluser]victorche[/eluser]
Yes, I know this ... but the strange thing is ... even if I add /welcome/index/ in the url, it still says "Error 404". And I thought, I can fix this somehow with the routes, but no success ![]()
[eluser]victorche[/eluser]
my mistake! it works! So the question is ... how can i fix this with the routes ... ?
[eluser]Cristian Gilè[/eluser]
Code: $route['(:num)/(:num)'] = 'welcome/index/$1/$2'; Cristian Gilè |
Welcome Guest, Not a member yet? Register Sign In |