e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

Feature Request: 2nd Front Page based on Userclass #954

Open LaocheXe opened 9 years ago

LaocheXe commented 9 years ago

There is a FRONTPAGE already, requesting another FRONTPAGE2 (to allow admin with different users in different user classes to see different pages than just the one (Set as home pages/front page))

CaMer0n commented 9 years ago

You want the FRONTPAGE to be different , according to userclass?

LaocheXe commented 9 years ago

Yes

willem010 commented 9 years ago

you can (mis)use the welcome message for this. just use the message as a template file, placing your menu;s using the {plugin= } and define wmessages for each user group.

then just create a template for your first page, using just the wmessage

LaocheXe commented 9 years ago

I could but with the new version of e107 you have the theme to consider. 2nf front psge would allow something different than just a wmessage. Frontpage1 would be for every one set on jumbotron (featurebox set) FrontPage 2 on a different them page.

willem010 commented 9 years ago

i think i didnt explain clear enough..

1) in theme.php create an empty theme layout .. f.i. $LAYOUT['FRONTPAGE'} .. and only add {wmessage} for content. you can use as much of the normal layout here. (header / footer stuff) now you have an empty layout which just shows a wmessage for content..

2) configure a wmessage for usergroup x, and fill the layout part (which usually is in the theme.php, but for this trick we move that to the wmessage .. making a template in there instead of just the wmessage

so wmessage will look something like this :

.. div > ..

{plugin=whatever}
{plugin= ... /div> whatever your theme is. create the full page layout there, using all the menus you want on this page for this usergroup. repeat for each different usergroup you want to have a alternate layout 3) in the theme manager add the FRONTPAGE tag to the new layout, so it will only be used on the frontpage. ,voila.. yeah, e107 wasnt designed to function like this, but it works great. i'm using this trick on 2 of my sites.
LaocheXe commented 9 years ago

True but FRONTPAGE is set to one of the theme layouts - layout I pick is what I want every one to see - 2nd front page is for others (site news people/forum moderators) etc...

Having an option to have, 2-3-4 types of front pages would be good/nice - I can see it as an option to have more than one. in theme admin area, frontpage for jumbotron, frontpage2 for full page etc etc- it be a nice feature and something the other CMS don't have (that I know of).

Think about it as a splash page - one set up for guest, (the main front page) - that has all of the stuff about joining the website make an account etc etc, then for members they get another frontpage with another theme layout for it with whatever you want to put on it. Sure you can do it your way with all of that, but it be best for the new people of e107 to have it easy to do within the admin area and not in the code.

LaocheXe commented 8 years ago

To elaborate about this some more. using Bootstrap 3 - FRONTPAGE is on the mordern_business layout, FRONTPAGE=2 (or how ever you want it to be (FRONTPAGE2)) would be site on the Jumbotron (sidebar-right) and maybe set the access on who see's the 2nd front page to a user group.

Jimmi08 commented 8 years ago

Did you test that what happens if you don't use FRONTPAGE in theme layout? If you set f.e. custom page as frontpage, will it take layout for this custom page or default layout ?

LaocheXe commented 8 years ago

@Jimmi08 - I never tried that

Just did it and it kinda screws with the look a little bit - miss places the welcome message, etc... I wouldn't do it.

Jimmi08 commented 8 years ago

@LaocheXe but it seems more logical to me than have more frontpages. Maybe would be more easier/understandable to be able to set layout for each frontpage. Just idea.

CaMer0n commented 8 years ago

layout_with_userclass

I believe something like this would solve it.

Jimmi08 commented 6 years ago

@Moc this can be closed

CaMer0n commented 6 years ago

The function doesn't work, but the option is there in debug mode.

Moc commented 6 years ago

@CaMer0n Can this be moved out of debug mode into live?

Jimmi08 commented 3 years ago

@Moc What happened with this? The solution above is not the correct approach.

The correct solution is:

  • using Frontpage settings (inbuilt userclasses system) and remove FRONTPAGE from theme settings. Then needed layout is used.

If you need one page for different classes, then tablestyle is the place for this. USERCLASS_LIST is available. (USERCLASS is empty - issue already exists).

Or you can use custom pages for this - set layouts in theme manager and access in Frontpage settings.

The charm is to remove FRONTPAGE from layouts, this is all.

Never mind, an important change for the frontend is not forcing {WMESSAGE} anymore.

Moc commented 3 years ago

No idea. @CaMer0n ?