ex:
if i $(’#divdadosreserva’).load(’../reserva/_form_1’);it references the controller
I would like to have the absolute patth or if possible the relative path of a view
thanks
ex:
if i $(’#divdadosreserva’).load(’../reserva/_form_1’);it references the controller
I would like to have the absolute patth or if possible the relative path of a view
thanks
$view = Yii::getPathofAlias(‘application.views.reserva._form_1’);
echo $view;
See:getPathofAlias
thanks , but i need the url , cause this dont work with ajax.
Why don’t you use createUrl, or createAbsoluteUrl?
Example, supposing that your controller name is ReservaController:
$('#divdadosreserva').load('<?php echo $this->createUrl('reserva/_form_1'); ?>')
What worked for me is like that:
<?php $url=yii:app()->createUrl('reserva/_form_1')?>
then…
$('#divdadosreserva').load('<?php $url ?>')