Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Make Menu Item show for anonymous users only?

posts: 28

I am playing with the menu bar and would like to do two separate home pages. One for logged in users and one for users not logged in. I suppose the closest analogy would be like Facebook. the login page is the home page. but after you log in the home page is your news feed.

How do I make a menu item and its corresponding page only show up to anonymous users (and the admin of course)?

posts: 758 United States

dracozny, clone the existing menu module, then use it instead of the default menu, since you cannot modify the default you need to clone it and put the default menu module away and use your cloned menu.
Once you have cloned your menu, you can adjust each menu item for permissions. Then position your new menu module in place of default menu.


posts: 758 United States

Rereading your original topic, I saw that you wanted a different perspective for anonymous on the entire home page as well, not just the menu. Sorry about that, I did not address that issue. And I am not sure how to make an entire home page view differently for anonymous.
But, I know it can be done, I think it's going to involve the "perspectives" feature. But I have not played around with that at all. Hopefully someone who has will be along and shed some light on it.
Try this for now and see if this helps. https://doc.tiki.org/Perspectives


posts: 758 United States
Thinking more on this, you could fill your home page with modules containing the items you wish to present to anonymous, and just set the permissions for anonymous and admin only, then when they are logged in, the modules set to users would apply to users only. Just another way to tackle this. As in the world of Tiki, seems there are many ways to skin a cat.

posts: 4661 Japan

Another approach is to activate "Use group homepages" on tiki-admin.php?page=general, under the "Navigation" tab. Then make a new wiki page for Registered users, and edit the Registered group information to specify that page as the group's homepage. Of course the Registered group's homepage would have its permissions set to be visible only to Registered users.

About the homepage link in the menu, one way would be to make the link to "tiki-index.php" and then Tiki will sort out which group homepage to display. (I haven't tested all of this recently but believe it should work.)

-- Gary


posts: 28

I was referring to a horizontal menu labeled as "My Menu" perhaps that was created by the community profile or something. it created two subsections for a logged in user and a nonuser. but I hated the use of a dropdown for a home button.

User group homepages was the answer for the most part. It took me a minute or so to figure out where the home page for the group was actually set. but now I can set a home page for admins as well which should be useful.

The only thing left is to deny access to registered users to the original homepage or some sort of redirect but the first option would be better so it doesn't show up in the page list.

I like your module permission idea. Although I have ben thoroughly confused about making modules because anything I create under the modules administration page can only be applied as widgets of sorts to the site itself. and not to individual pags.

posts: 3665 United States
The only thing left is to deny access to registered users to the original homepage or some sort of redirect but the first option would be better so it doesn't show up in the page list.

You can do this quite easily with the Group plugin:

Copy to clipboard
{GROUP(groups="Registered)} Redirect to another page {ELSE} Show the homepage content. {GROUP}

I like your module permission idea. Although I have ben thoroughly confused about making modules because anything I create under the modules administration page can only be applied as widgets of sorts to the site itself. and not to individual pags.

You can use the Module plugin to add a module to any wiki page:

Copy to clipboard
{module module="your_module_name"}


HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
posts: 28

Thanks. I apparently missed that part

As far as the module plugin, I was a bit surprised that worked I have the insert module button on my toolbar and it will not list custom user modules. Only the ones from the site modules folder.

posts: 28

Insert module button is in /tiki-admin_toolbars.php it will be in the "plugin tools" and is simply titled "Modules" with 3 gears for an icon.

Rebuilding the Index solved the missing modules in the tool, Thank you.


Upcoming Events

1)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4) 
Tiki birthday
5)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting