Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony] problem z routingiem
blackroger
post
Post #1





Grupa: Zarejestrowani
Postów: 176
Pomógł: 0
Dołączył: 8.11.2008

Ostrzeżenie: (0%)
-----


witam mam taki wpis w routingu....

editdeliverydetails:
url: /:module/:action-:bla
param: { module: auction, action: editdelivery }
requirements: { bla: \d+ }

taki w akcji:

  1. public function executeEditdelivery(sfWebRequest $request)
  2. {
  3. $usid = $this->getUser()->getAttribute('usid', null, 'user');//takes usid
  4.  
  5. $deliv_id = $this->request->getParameter('bla');
  6. print_r($deliv_id);
  7.  
  8. }//end executeEditdelivery
  9.  
  10.  
  11. //a taki w widoku:
  12. <ul class="auct_edit_menu_ul">
  13. <li><a title="Edit delivery details" href="<?php echo url_for('auction/editdelivery?bla=1') ?>">Edit</a></li>
  14. </ul>



Link jest konwertowany dobrze do postaci

http://192.168.1.221/auction/editdelivery-1

ale nie jest widoczny w kontrolerze w akcji....tak jakby go nie było....dziwnym jest fakt ze jak do bla przypisze stringa np. costam to wtedy go czyta. Co może być problemem? A właśnie jak użyję zmiennej aid to wszystko działa. Może jakiś konflikt wpisów. Poniżej przedstawię cały routing.yml.

category:
url: /category/:catname-:id
param: { module: main, action: category }
requirements: { id: \d+ }

auctiondetails:
url: /:module/:action-:type-:aid
param: { module: auction, action: details }
requirements: { aid: \d+, type: '(prepared|active|finished|cancelled)' }

editdetailsauction:
url: /:module/:action-:aid
param: { module: auction, action: editdetails }
requirements: { aid: \d+ }

deliverydetailsauction:
url: /:module/:action-:aid
param: { module: auction, action: deliverydetails }
requirements: { aid: \d+ }

editdeliverydetails:
url: /:module/:action-:bla
param: { module: auction, action: editdelivery }
requirements: { bla: \d+ }

# default rules
homepage:
url: /
param: { module: main, action: index }

default_index:
url: /:module
param: { action: index }

default:
url: /:module/:action/*

Ten post edytował blackroger 4.12.2009, 18:41:43
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 18:34