Change Frontend Templates - Forum | JoomShaper
Staff replied SP Page Builder

Change Frontend Templates

Asked by jackson 2 years ago Last activity 2 years ago

Hello, I'm trying to implement a way for registered users to change the layouts of the home page through the frontend. Could someone help me with some direction on how to do this? My system is almost complete with all the functions to change colors, logo, contacts, etc., but I would like to give the user the option to change the layouts of the HOME page through the frontend panel. I don't want to give backend permissions to any regular user.

It's a restricted system for the client who hired it. There will be no user registrations. Only those who receive access will be able to access the system.

I appreciate any help.

8 replies

jackson Asked this

I thought about leaving the pages ready in the backend as Home, Home B, Home C... and on the frontend having some way to activate this menu as the main one, but I didn't find any code that did that.

Paul Frankowski Senior Staff

Hi Jackson,

for older Joomla was extension: CG Template Switcher and Advanced Template Manager

Search in that direction.

Paul Frankowski Senior Staff
2 years ago · edited

For Registered users you can use different template with different Color Scheme... ATM allowed that or extra loaded .css file with 2nd color scheme. "Any help" provided :]


In general, this topic goes beyond our products, so please visit forum.joomla.org for more tips. There is a bit of experiments involved, but after all it is possible.

jackson Asked this

Thanks, I'm looking for some code that does this, I think it's possible with Jdatabae but I don't have full knowledge.

I'm building my J5 systems with the minimum possible extensions and don't want to have to install anything beyond what I have, unless it's really necessary.

jackson Asked this

Some function that changes the final ID of the menu item, but this would have to be done by the frontend. I would create all my pages in SP Page Builder Pro and create just one button on the frontend that would change the final ID of the menu to 1, 2, 3...

index.php?option=com_sppagebuilder&view=page&id=1
Paul Frankowski Senior Staff

It is an option, maybe not the best but it is there.

You have to think also about future, how to manage so many similar pages which differ only in colour.

jackson Asked this

It's a very complex system I'm working on, everything is changed by frontend, but I would just need to give the end client a way to change the home page when needed. And I could also earn some extra money by creating "premium" layouts. All I need is a function that changes the final ID of the menu item and the problem would be solved.

I'll try on the joomla forum, thanks.

jackson Asked this

This code did exactly what I needed, can you confirm in terms of security if I will have any hacking problems by using this on any page?

$alterar_home = new stdClass();

$alterar_home->id = 101;
$alterar_home->link = 'index.php?option=com_sppagebuilder&view=page&id=2';

$result = JFactory::getDbo()->updateObject('#__menu', $alterar_home, 'id');
Paul Frankowski Senior Staff

Sorry, but we don't provide Security Audits. Ask Expert from your city/country.

Log in to reply.