Answer the question
In order to leave comments, you need to log in
Why is the action not working in the controller?
There is a page template with a button to delete elements.
echo "<div class='main_project'>
<div class='info_project'>
<div class='name_project'>
$name
</div>
<div class='url_project'>
URL <a href='$url' target='_blank'> $url</a>
</div>
<div class='resurs_project'>
Используемые ресурсы при разработке: $resurs
</div>
<div class='studio_project'>
Проект реализован в студии: <a href='#'>$studio</a>
</div>
<a href='$baseUrl/Deleteproject'>Удалить</a>
<button>Редактировать</button>
</div>
<div style='background: url($baseUrl/images/mon.png) no-repeat;' class='pic_sloy'>
<a target='_blank' href='$baseUrl/images/projects/$pic'><img class='pic_project' src='$baseUrl/images/projects/$pic'></a>
</div>
</div>";
public function actionDeleteproject()
{
print_r('test');
die();
return $this->render('index');
}
Answer the question
In order to leave comments, you need to log in
one)
$baseUrl/deleteproject
echoit is necessary to render the template normally and display only the values of the variables through echo.
$baseUrl/where does it come from? use standard helpers like Url:to or UrlManager functions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question