Unique Main page without CMS
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Unique Main page without CMS
Aimeos 2022.10.4
PHP version 8.1
Windows 10
Hello!
I would like to create a '/' page.
I tried to create a route and a controller,
Because I have unique contents like News, which it does not support by CMS
class HomeController extends Controller
{
public function indexAction() {
.
...
....
return View::make('mastertheme::home.index', $params);
}
The problem is, i want to use functions, which start like that: $this->
but there is no $this
$this contains many things I tried to create $this object by class TestHelper. But the end result is bad.
What is the recommended way?
PHP version 8.1
Windows 10
Hello!
I would like to create a '/' page.
I tried to create a route and a controller,
Because I have unique contents like News, which it does not support by CMS
class HomeController extends Controller
{
public function indexAction() {
.
...
....
return View::make('mastertheme::home.index', $params);
}
The problem is, i want to use functions, which start like that: $this->
but there is no $this
$this contains many things I tried to create $this object by class TestHelper. But the end result is bad.
What is the recommended way?
Re: Unique Main page without CMS
If you have an Aimeos view, "$this" is always available in the Aimeos template because it's the view object itself. If it's a Blade view, then you don't have any Aimeos view helpers and only the Laravel Blade directives are available.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Unique Main page without CMS
I think I understood.
Main page has a Laravel controller
Main page has a Laravel blade home.blade.php
with this code
and in the shop.php
and it calls ...\Catalog\Home\Standard.php like a second controller
and it renders ...\catalog\home\body.php and header.php
And I have to work with them.
Main page has a Laravel controller
Code: Select all
class CatalogController extends Controller
public function homeAction() {
}
}
with this code
Code: Select all
@section('aimeos_body')
<?= $aibody['catalog/home'] ?? '' ?>
@stop
Code: Select all
'page' => [
'catalog-home' => ['catalog/home', etc. ],
and it renders ...\catalog\home\body.php and header.php
And I have to work with them.