Homepage for eachsite

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
JanAlfred
Posts: 1
Joined: 24 Feb 2022, 02:02

Homepage for eachsite

Post by JanAlfred » 24 Feb 2022, 02:51

Hi, I'm new to Aimeos. I'd like to use multisite Aimeos. when I go to mymainsite.com it shows me the homepage perfectly. then I create a new site on the same domain mymainsite.com/vendor1. i tried to create a homepage for the vendor1 with its logo etc using the CMS provided but all i get is page not found and an empty page with only the header and footer (with main homepage logo). how do I create a homepage for each vendor that I create? should I use the CMS?

thanks
Jan

I'm using Laravel 6 , Aimeos 2021.x, PHP 7.4 and Windows 10.

User avatar
aimeos
Administrator
Posts: 7915
Joined: 01 Jan 1970, 00:00

Re: Homepage for eachsite

Post by aimeos » 24 Feb 2022, 07:31

To show a CMS page for each vendor, you have to add this route in your ./routes/web.php file:

Code: Select all

// prefix: yourdomain.com/vendor1
Route::group(['prefix' => '{site}', 'middleware' => ['web']], function () {
    Route::match(['GET', 'POST'], '{path?}', '\Aimeos\Shop\Controller\PageController@indexAction')
        ->name('aimeos_page')->where( 'path', '.*' )->where( ['site' => '[a-z0-9\-]+'] );
});
Also have a look at the documentation: https://github.com/aimeos/ai-cms-grapesjs#laravel
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply