Fork me on GitHub

Content as Start module - need to show a different page to logged-in users than to visitors  Bottom

  • I use Content as Start module. On the start page, I need to show different content to logged-in users than to un-logged visitors. And visitors shall not see any message like "you don't have access privilege to view this content".

    Currently, I have hard-coded this functionality in my theme, so visitors don't see the Content start page at all. Only after logging in, the theme template allows users to display the Content start page:

    Code

    <!--[if $loginviaoption eq 1]--> ... <!--[else]--> ... <!--[/if]-->

    Is it possible to get the same functionality directly in Content?
  • Hi,

    there is no permission scheme (yet) for specific content items by id. There are some tickets about more permission control already in the trakcer, but not exactly like you question. You can only set permissions for a single page content:page: | Page id:: | rights or set permissions for a specific plugin: content:plugins:content | pluginname | rights.

    If you dont want users to see the warning messages than a check like what you have done might be the best option.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Quote

    Is it possible to get the same functionality directly in Content?

    just an idea:

    Show in general for all users the page for not logged in users as startpage. Than you can make your menu with the link to "home" different from the menu dependant of the login status. With the menu of the logged in user you can point to a different startpage. The different menus can be shown by a trick with blockzones. If you create two blockzones for the place of your menu, you can do via else/if the choice of the right blockzone. But the regular permission system is also doing what you need. Depends on your layout and your creativity icon_wink

    This is not exactly what you has asked for but might be it is doing what you need.

    --
    webmaster of gvoh.de and pggo.de

    project manager of new module media repository
  • Hi,

    thank you for your answers!

    I will try this one: Deny access to Content for unregistered users, so they will be re-directed to the loginscreen with this URL:

    Code

    www.yourdomain/index.php?module=Users&func=loginscreen&returnpage=%2Findex.php

    The only remaining issue for me is the display of this phrase on top of the loginscreen:

    Code

    Sorry! You have not been granted access to this page.

    Can I de-activate this message for just the Content page that I use as the start page?

This list is based on users active over the last 60 minutes.