Hello everyone, I'm having this issue where when I use the unique id for each row from my database to create a page for every id - I keep getting every page that I type, no matter what the url is (i.e /pagethatdoesntexist), to return my "Card" page without the database content because it doesn't match the id for any of the rows.
Am I using the "/:id" part wrong? Thanks for the information on this in advance!
title = "Card"
url = "/:id"
layout = "default"
is_hidden = 0
==
<?php
use RainLab\User\Models\User;
use System\Models\File;
function onInit() {
$id= $this->param('id');
$this['profile'] = Db::table('users')->where('is_activated', '=', '1')->where('id', $id)->first();
}
?>
==
Last updated