XF 2.0 How to create a new page for each entity?

If I do that then, I get the following error:
Code:
The requested page could not be found. (Code: invalid_action, controller: AH\DevTracker:DevTracker, action: Azpzodja)

View attachment 189866

It has to work!

Could you please try with,

Code:
public function actionView(ParameterBag $params)
{
    $entry = $this->assertEntryExists($params->entry_id);

    $viewParams = [
        'entry' => $entry,
    ];

    return $this->view('AH\DevTracker:DevTracker\View', 'ah_dev_tracker_view', $viewParams);
}
 
It has to work!

Could you please try with,

Code:
public function actionView(ParameterBag $params)
{
    $entry = $this->assertEntryExists($params->entry_id);

    $viewParams = [
        'entry' => $entry,
    ];

    return $this->view('AH\DevTracker:DevTracker\View', 'ah_dev_tracker_view', $viewParams);
}

It does not :( I even tried changing :int to :str, since entry_id is a string not an integer.

Edit: I got it to work! In the actionIndex, I had to change this:
Code:
if ($params->entry_id)
{
    return $this->rerouteController(__CLASS__, 'view', $params);
}

To this:
Code:
if ($params->id)
{
    return $this->rerouteController(__CLASS__, 'view', $params);
}

Thanks for the help @XDinc
 
Last edited:
Top Bottom