How can i create text page teamplate (like About Us)

How to configure and adapt Aimeos based shops as developer
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!
yeh
Posts: 19
Joined: 27 Jun 2022, 13:26

Re: How can i create text page teamplate (like About Us)

Post by yeh » 03 Aug 2022, 12:53

aimeos wrote: 03 Aug 2022, 12:24 First of all: Don't change any files in the vendor directory! Never!
You won't be able to update your installation any more to get bugfixes and security fixes.

If you are working with different themes, make sure you have adapted the templates of your custom theme(s).
Yes, I have been making changes in my custom theme rather than in the vendor directory.
aimeos wrote: 03 Aug 2022, 12:24 @yep: Make sure that your "pages" section in the ./config/shop.php file contains this to display the categories in the CMS pages: https://github.com/aimeos/aimeos/blob/m ... op.php#L61
My shop.php file already has this line in it, but the menu still does not show

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

Re: How can i create text page teamplate (like About Us)

Post by aimeos » 03 Aug 2022, 12:58

Do you use a custom theme?
If yes, does the page/index.blade.php template from your extension look like this (with "shop::base" replaced by the theme base template)?

https://github.com/aimeos/aimeos-larave ... .blade.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yeh
Posts: 19
Joined: 27 Jun 2022, 13:26

Re: How can i create text page teamplate (like About Us)

Post by yeh » 03 Aug 2022, 13:06

Yes, my theme index.blade.php is exactly like that.

I do have two extensions in my packages directory. One is for admin changes and one for the front-end theme. The admin extension doesn't have any theme files in it so it shouldn't affect things, but I mention it just in case it does have an effect.

yeh
Posts: 19
Joined: 27 Jun 2022, 13:26

Re: How can i create text page teamplate (like About Us)

Post by yeh » 04 Aug 2022, 14:08

Okay, I have found the solution. In my base.blade.php the nav is displayed with:

Code: Select all

@yield('aimeos_head_nav');
So I had to change:

Code: Select all

@section('aimeos_nav')
to

Code: Select all

@section('aimeos_head_nav')
in page/index.blade.php

I also had to change

Code: Select all

@section('aimeos_basket')
to

Code: Select all

@section('aimeos_head_basket')
to make the basket appear in the header

yeh
Posts: 19
Joined: 27 Jun 2022, 13:26

Re: How can i create text page teamplate (like About Us)

Post by yeh » 04 Aug 2022, 14:29

As a quick follow-up to this, I would also like to have the search box in the header for CMS pages. I can see that in Aimeos/Shop/Controller/PageController.php that only cms/page, catalog/tree and basket/mini are added to the params array.

How can I decorate or override this to include catalog/search too?

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

Re: How can i create text page teamplate (like About Us)

Post by aimeos » 05 Aug 2022, 07:03

Same way as for the navigation: Add "catalog/search" to your ./config/shop.php and to the Blade template
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yeh
Posts: 19
Joined: 27 Jun 2022, 13:26

Re: How can i create text page teamplate (like About Us)

Post by yeh » 05 Aug 2022, 08:54

Excellent, works perfectly. Thank you!

Post Reply