Forums / Setup & design / Making homepage & top menu change for anon & members

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

eZ debug

Timing: Jan 17 2025 23:46:25
Script start
Timing: Jan 17 2025 23:46:25
Module start 'content'
Timing: Jan 17 2025 23:46:26
Module end 'content'
Timing: Jan 17 2025 23:46:26
Script end

Main resources:

Total runtime1.0968 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 588.9922180.8125
Module start 'content' 0.00770.9300 769.8047623.5469
Module end 'content' 0.93770.1590 1,393.3516341.3672
Script end 1.0967  1,734.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3915210.0002
Check MTime0.00170.1595210.0001
Mysql Total
Database connection0.00070.064110.0007
Mysqli_queries0.994490.66632020.0049
Looping result0.00240.21482000.0000
Template Total1.064997.120.5325
Template load0.00210.191820.0011
Template processing1.062896.903220.5314
Template load and register function0.00020.016010.0002
states
state_id_array0.00130.116010.0013
state_identifier_array0.00120.111820.0006
Override
Cache load0.00180.1627330.0001
Sytem overhead
Fetch class attribute can translate value0.00150.139340.0004
Fetch class attribute name0.00160.141680.0002
XML
Image XML parsing0.00460.421440.0012
class_abstraction
Instantiating content class attribute0.00000.0019100.0000
General
dbfile0.01381.2580400.0003
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs