Pergunta

I am developing my first page in Kohana 3.2 framework and I have a big problem. I have about 3 controllers:

  1. default extends Template Controller,
  2. home extends Default,
  3. list extends Default.

Every controller has its own actions. I log in with home/login and redirect to list controller which opens action index to show some things in content of the template. The opened content has links to manage diffirent contents (like reprinting table with diffirent things in it). I want links to work like this controller/action but if one link is pressed, lets say, list/show, and i press again list/show (cause the menu is being shown all the time), it tries to enter list/show/list/show instead of just reopening the list/show. To sum up, it just adds pressed link to previous one, creating a mess. Does somebody know why is this happening? Apache's rewrite module is turned on.

Foi útil?

Solução

Always being href's with a slash and specify the path to the controller from the web root. In other words the link should be:

<a href="/list/show">
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top