Dear Users, Developers and Contributors,
I have been looking on the JED for a component that does this. I came onto Kazaam!. But there is no support and it is not working the way I want it to work. I want to give my users the possibility to create a article through the front end with normal Joomla article creation then they go to menu item 2 which will be this form.
In this form the user can fill in the name of the menu, alias and then selects the article from a drop down populated with all articles. On save it creates a menu item with single article and the selected article as the article.
Now as always this is possible with ChronoForms but how should I go on about it?
I will update this post regularly with more information and tips.
Currently I am a bit stuck at the database settings.
Alright I started with a fresh form. I have got it partially working. The menu title is beeing saved to the database including a lot of other settings. I am now at the point of selecting the parent.
In the joomla DB this is saved as a number(id). I want this id to be lookedup and show in the dropdown the title's of the corresponding articles. So that the users know what the parent should be. Then on selecting it needs to save the ID to the DB and not the name.
So basically the following steps.
1. Lookup all ID's and correct menu title's and display those in dropdown.
2. User selects the correct menu title (This is easy!) and saves (Also easy!).
3. On save it converts the menu title back to an ID and saves this ID as parent_id in the db column.
Alright numbers 1,2 and 3 are working. Now to the next step.
It shows all articles what I now want to do is to disable everything except from two menutypes:
1. MainMenu and BottomMenu
Plus there are a few more issues to sort out.
2. It saves now the parent-id appropriately but it now needs to figure out on which level it is and save it in the level column. Otherwise it still thinks it is root while it is not.
3. The menu is now being build up wrongly. When opening the menu item it shows the correct parent id but everything gets nested behind the first item.
I really appreciate help on point 2? I have no clue how to tackle that issue.
Point 1: Still working on
Point 2: Still working on
Point 3: Somehow it is corrupting the table on save. Because after rebuilding it shows everything correctly.
How can I force a rebuild after save.
I found out what it is corrupting.
The order of Joomla 3 is different in comparison with the previous versions. The previous version had a table called something like "ordering" in here where the numbers and that showed the ordering. Now it is changed into "lft" and "rgt". And it works rather brilliant but irritating at the same time. What it does is as follows.
Root is always | lft=0 / rgt=HIGHEST NUMBER+1 in this case 5
Menu 1 | lft=1 / rgt=4
-Menu 1a | lft=2 / rgt=3
So it is impossible to seek for the highest number and do +1 because then it will be higher then the root. The only way I can figure this out is to force a rebuild. So the same question as in my previous reply stays open.
How can I force a rebuild after save.
Okey I found the following site! It is about Joomla 2.5 but it has the same lft rgt so it should do the trick.
http://tiku.io/questions/792972/how-to-invoke-menu-rebuild-from-the-custom-front-end-component-in-joomla
Only at this moment I have no idea how to implement this: 😲.
Seriously. No one reacting... No Greyhead, No Max. Where is everyone. Totally unexpected...