CMS extension

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!
MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Setup new entity for jsonadm

Post by MikaelNazarenko » 10 Feb 2021, 09:30

@aimeos, thank you so much! Now it works) Very good, and I see on page edition page, there is pages tree which I really need. Left only to integrate the pages tree!))

But can you please tell me the general conceptions about pages tree. My small imagination are: we will have one pages tree, without 1 root page, but tree may have several pages on root level. Then we can display pages tree on front-end as menu or else. I took a look at aimeos nested chains and I have general imagination of this mechanism. But can you please give me tips, what should I base on ? Because this situation seems different from catalog.

And maybe better have another place for discussion about cms package, maybe another topic on forum.

Thank you a lot !
Attachments
Screenshot from 2021-02-10 10-03-21.png
Screenshot from 2021-02-10 10-03-21.png (60.08 KiB) Viewed 10453 times

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

Re: Setup new entity for jsonadm

Post by aimeos » 10 Feb 2021, 12:44

It's not so different from the catalog panel. We may have several page trees for different menus but one menu should have one root node even if you only render its children it in the frontend.

The next step is that you set up the CMS panel exactly like the catalog panel so we have no cms list view any more and but only the tree and the data on the right of the tree. Therefore, you have to change the mshop_cms table, the cms manager and item as well as the JQAdm class and template to be like their catalog pendants and add a cms jsonadm implementation like for catalog.

Then, we only have to enable the possibility of several root nodes in the tree view.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Setup new entity for jsonadm

Post by MikaelNazarenko » 10 Feb 2021, 14:47

Very great! I will try to help you with this. But can you please say couple words about possibility of several root nodes in the tree view. How do we enable it ?

Thanks!

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

Re: Setup new entity for jsonadm

Post by aimeos » 10 Feb 2021, 14:57

IIRC, it's about returning an array instead of a single node here:
https://github.com/aimeos/ai-admin-jqad ... #L221-L225
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Setup new entity for jsonadm

Post by MikaelNazarenko » 10 Feb 2021, 15:11

ok, also need to think about widgets. After pages tree I would like to implement something kind of widgets. So we can place on page different widgets, like contact cards, comments and so on.

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

Re: Setup new entity for jsonadm

Post by aimeos » 10 Feb 2021, 15:18

It's possible to add custom HTML blocks to GrapeJS so you can extend the editor to your requirements but you may need to add some Javascript in the frontend for contact forms. For comments, Disqus is a good solution which you can embed into page using a custom HTML block.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Setup new entity for jsonadm

Post by MikaelNazarenko » 10 Feb 2021, 15:25

I thought to make it another way. Provide entity widget. And then it would be handy for user when he manage items in widget like media in product. I think it is more handy for customer to manage it such way than deal with html blocks in editor.. Moreover it is better because no need to copy and duplicate html. For example for "team cards" user can add/remove, edit image, text from back-end. I think better than deal with html. I also will integrate it, but need some tips from you, how to do it in aimeos pattern/style )

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Setup new entity for jsonadm

Post by MikaelNazarenko » 11 Feb 2021, 12:43

I work on cms tree and by the way delete item from tree not working. Screen just got grey. Modal is not opened.

This might be the fix

Code: Select all

$('#confirm-delete > div').modal('show')
And also seems vue has not rendered items
Attachments
Screenshot from 2021-02-11 14-50-04.png
Screenshot from 2021-02-11 14-50-04.png (29.4 KiB) Viewed 10449 times
Screenshot from 2021-02-11 14-42-39.png
Screenshot from 2021-02-11 14-42-39.png (51.94 KiB) Viewed 10454 times

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

Re: Setup new entity for jsonadm

Post by aimeos » 12 Feb 2021, 18:36

We've updated the GrapeJS code to include all components that are normally required and the JS code contains two examples how to create own entity widget components.

Also, the repository and the package has been renamed from ai-cms-grapejs to ai-cms-grapesjs (there was a "s" missing). You have to update your composer.json before running "composer up".

If you have problems, you can create a "WIP" (work in progress) PR in the repo to show your code but try to do separate PRs, e.g. for the manager/item, the JsonAdm and JQAdm parts.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Setup new entity for jsonadm

Post by MikaelNazarenko » 12 Feb 2021, 21:47

Hi)

I have created pull request, sorry, I don't know if I have done it very well, because I did not use pull requests so often..

For now there is couple bugs. The first is always appearing alert. And the second is delete modal is not working correctly, close buttons not working and info about deleting items not shown correctly.
Attachments
Screenshot from 2021-02-12 23-45-53.png
Screenshot from 2021-02-12 23-45-53.png (73.28 KiB) Viewed 10571 times
Screenshot from 2021-02-12 23-45-29.png
Screenshot from 2021-02-12 23-45-29.png (53.33 KiB) Viewed 10571 times

Post Reply