Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1008

Joomla! 5.x Coding • Re: Jdatabase Change ID Menu In Frontend

$
0
0
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.

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



Viewing all articles
Browse latest Browse all 1008

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>