Hi all,
I have a form and and a controller. My question is about Url that generates the CHtml::form
my Code
<?php
echo CHtml::form($this->createUrl('concept/displayMosaique/'),'get',array('id'=>'conceptFiltre'))
?>
<div id="dateFiltre">
<label for="Concept_dateAnnee">Classement par Année </label>
<?php echo CHtml::dropdownList('annee','dateAnnee',array('2011'=>'2011','2010'=>'2010')
,array('prompt' =>'Toutes les Années' ) ); ?>
</div>
<div id='formButton'>
<input type="submit" value="Afficher" />
</div>
<?php echo CHtml::endform() ?>
This code generates url like this
htt://mywebsite/concept/displayMosaique?annee=2011 for instance
But I would like
htt://mywebsite/concept/displayMosaique/annee/2011
In my config/main.php I wrote
'concept/displayMosaique/<filtre:\w+>/<data:\w+>'=>'concept/displayMosaique',
with this last code I can enter htt://mywebsite/concept/displayMosaique/annee/2011 and it works fine
But is there a way to indicate to my CHtml::form that I want this kind of url rather than
htt://mywebsite/concept/displayMosaique?annee=2011 for instance
thanks