Making homepage & top menu change for anon & members

Author Message

Jamie Robe

Friday 20 June 2008 6:57:46 am

Hi. Here is my plan and I appreciate any advice on how to approach this:
My site is to have three level of users: anonymous, freemember, and paidmember. I want the various levels to see different home pages, as well as give them different top menu bar selections.
Q1 Home Page
For example, the home page for anonymous members will have lists of features, a site news blog, and details on how to become a free member. When someone signs up and logs in, I don't that same info. I now want the freemember to see more content and now see info on how great it would be to become a paidmember. How do I make a different home page or home page content to drastically change based on user access permissions?

Q2 Top Menu Tabs to change
I see how to set a restricted section and allow those subfolders and subfrontpages to appear only for freemembers and then paidmembers, but it seems to be cummulative. The "higher" level members inherit the lower level content, etc. How is the best way to control the menu for this type of site?

Thanks!
Jamie

A heavy Plone user who feels like he is "cheating" by looking at EZ Publish, but it looks so good so far :-)

Donat Fritschy

Monday 23 June 2008 10:03:30 am

The best way would be to organize your content into different sections, according to the different memberships.
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/content_management/sections

You can the use the rights managment to define which user groups have access to which sections:
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/access_control

If defined properly, all your content, including the main menu, will be tailored automatically.

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

Jamie Robe

Monday 23 June 2008 10:35:24 am

Thank you Donat. I have reviewed that documentation and have been able to get my Question 2 to work - I have a section and permissions that turn "on" or "off" depending what a user's level is at. I am still perplexed about my first problem:

I don't see how to make an alternative "node 2" frontpage for the site home page. If I have content on the page, say "news" in the right hand column, that is available only to logged in users, then the home page will have a nasty "News - You do not have permission to view this object." instead of a blank area.

Is their a way around this, either by turning off such permission notices OR by some other means?
Thanks

A heavy Plone user who feels like he is "cheating" by looking at EZ Publish, but it looks so good so far :-)

André R.

Monday 23 June 2008 10:57:25 am

You can either override the embed_denied.tpl template globally or for that specific embed relation.
Or you can do what's normally done, create the frontpage problematically with a custom template that handles user level and access.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Donat Fritschy

Tuesday 24 June 2008 12:46:25 am

The easiest way to distinguish between anonymous and logged-in users is by inspecting the $current_user variable, which is available when pagelayout.tpl is being processed:

{if $current_user.is_logged_in}

your news block goes here

{/if}

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:46:54
Script start
Timing: Jan 29 2025 23:46:54
Module start 'layout'
Timing: Jan 29 2025 23:46:54
Module start 'content'
Timing: Jan 29 2025 23:46:54
Module end 'content'
Timing: Jan 29 2025 23:46:54
Script end

Main resources:

Total runtime0.0173 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.2813151.2266
Module start 'layout' 0.00610.0024 739.507836.6797
Module start 'content' 0.00850.0073 776.187598.3125
Module end 'content' 0.01580.0014 874.500037.9922
Script end 0.0173  912.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.0366140.0002
Check MTime0.00105.9340140.0001
Mysql Total
Database connection0.00137.383410.0013
Mysqli_queries0.002815.948130.0009
Looping result0.00000.075610.0000
Template Total0.00116.210.0011
Template load0.00084.792610.0008
Template processing0.00021.349110.0002
Override
Cache load0.00063.402210.0006
General
dbfile0.002715.589280.0003
String conversion0.00000.034440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs