Change Frontend Templates - Question | JoomShaper

Change Frontend Templates

J

jackson

SP Page Builder 1 year 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.

0
9 Answers
J
jackson
Accepted Answer
1 year ago #168996

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.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #169008

Hi Jackson,

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

Search in that direction.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #169009

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.

0
J
jackson
Accepted Answer
1 year ago #169010

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.

0
J
jackson
Accepted Answer
1 year ago #169011

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
0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #169012

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.

0
J
jackson
Accepted Answer
1 year ago #169013

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.

0
J
jackson
Accepted Answer
1 year ago #169015

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');
0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #169033

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

0