Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

view a url variable in a view

I want to see who sent the url variable in the view using php

public function KardexAction($ART_CODIGO) {


Can you explain? Your question isn't clear.


I get the variable url, this is generally used in the controller but I need to display that variable in the view

use Phalcon\Mvc\Model\Criteria;
use Phalcon\Paginator\Adapter\Model as Paginator;

class SpmArticuloController extends ControllerBase {
    public function KardexAction($ART_CODIGO) {

        $SPM_ARTICULO = SpmArticulo::findFirstByART_CODIGO($this->base64url_decode($ART_CODIGO));
        if (!$SPM_ARTICULO) {
            $this->flash->error("<div class='alert callout round' data-closable>"
                    . "<h5>Esto es Importante!</h5>"
                    . "<button class='close-button' aria-label='Dismiss alert' type='button' data-close>" . "<span aria-hidden='true'>&times;</span> </button>"
                    . "<p>El articulo no fue encontrado " . $this->base64url_decode($ART_CODIGO) . "</p></div>");

            return $this->dispatcher->forward(array(
                        "controller" => "spm_articulo",
                        "action" => "index"

It 's my view



I want to see the variable $ ART_CODIGO in my view, in a variable php

edited Nov '16

In controller:

$this->view->spm_articulo = $SPM_ARTICULO;

and in view:

echo $spm_articulo;



Thank you very much for your help