The following code seems to work perfectly, now I don't know how to make a function, I have little knowledge in programming, if someone can help me, I would need the code below to be called depending on the button the user clicks, Layout A, Layout B...etc;
I tested the code by inserting it directly into the template's index.php. The menu ID is changed correctly.
I tested the code by inserting it directly into the template's index.php. The menu ID is changed correctly.
Code:
$alterar_home = new stdClass();$alterar_home->id = 101;$alterar_home->link = 'index.php?option=com_sppagebuilder&view=page&id=1';$result = JFactory::getDbo()->updateObject('#__menu', $alterar_home, 'id');
Statistics: Posted by cropots — Thu Sep 26, 2024 8:22 pm