[ZendFramework]Problem z routingiem |
[ZendFramework]Problem z routingiem |
6.05.2013, 22:31:21
Post
#1
|
|
Grupa: Zarejestrowani Postów: 42 Pomógł: 0 Dołączył: 8.02.2013 Ostrzeżenie: (0%) |
Witam
Dodałem sobie parametr języka w bootstrapie w następujący sposób
Niestety z jakis nieznanych mi powodow nie wypisuje mi wtedy action w formularzach a robie to tak
dlaczego tak się dzieje?? |
|
|
6.05.2013, 22:48:33
Post
#2
|
|
Grupa: Zarejestrowani Postów: 279 Pomógł: 60 Dołączył: 25.02.2012 Ostrzeżenie: (0%) |
otwierasz dokumentację Zend_View_Helper_url i czytasz:
Generates an url given the name of a route. return: Url for the link href attribute. access: public string url ([ $urlOptions = array()], [mixed $name = null], [bool $reset = false], [ $encode = true]) array $urlOptions: Options passed to the assemble method of the Route object. mixed $name: The name of a Route to use. If null it will use the current Route bool $reset: Whether or not to reset the route defaults with those provided $encode podpowiedź: drugi parametr to nazwa route -------------------- there is much to be learned
|
|
|
8.05.2013, 18:40:05
Post
#3
|
|
Grupa: Zarejestrowani Postów: 42 Pomógł: 0 Dołączył: 8.02.2013 Ostrzeżenie: (0%) |
mam teraz taki problem że przestał mi działac link typu
/profile/show/id/1 poniewaz zend tak to zaczął traktowac Request Parameters: array ( 'lang' => 'profile', 'module' => 'show', 'controller' => 'id', 'action' => '1', ) wszystko działa jak dodam w bootstrapie:
ale jak zrobic zeby działała zawsze reguła controller/action/zmienna1/wartosc1/zmienna2/wartosc2/ i tak dalej?? |
|
|
8.05.2013, 21:20:57
Post
#4
|
|
Grupa: Zarejestrowani Postów: 2 958 Pomógł: 574 Dołączył: 23.09.2008 Skąd: wiesz, że tu jestem? Ostrzeżenie: (0%) |
Zend sam w sobie (bez żadnych ustawień) definiuje ścieżki. To co pokazałeś to właśnie taka ścieżka - /controller/action/param1/value1
Usuń wszystko co jest związane z routerem. Następnie w pliku .phtml dodaj np.
I sprawdź co wygeneruje, powinno się wyświetlić '/index/index/lang/pl' Ten post edytował CuteOne 8.05.2013, 21:22:04 |
|
|
Wersja Lo-Fi | Aktualny czas: 24.04.2024 - 08:32 |