Loading...
 
Features / Usability

Features / Usability


Menu module; include a page menu but keep that page hidden for visitors

posts: 8556 Israel

Hello,

In Tiki24 I can use a wiki page in a menu page module like the Tiki shared footer menu that is visible for anonymous.

However I don't want anonymous (or the sitemap) to directly access this page on its own.
- When Anonymous "access the page" included in a module the content is displayed
- When Anonymous access the page directly the content is NOT displayed

In the object permission (on the page) I tried to figure what permission to turn on and off:

  • Can view page/pages (tiki_p_view)
  • Can use the page as a template for a tracker or unified search (tiki_p_use_as_template)
  • Can view in module and feed the wiki pages reference (tiki_p_wiki_view_ref)


But it is an all or nothing situation.

Or Anon can see the page and so the content can be used in a module.
Or Anon can't see the page or the content.

Any ideas on this ?

posts: 3665 United States

So... you want Anonymous visitors to be able to view the page, only if they arrive on the page from the link in the menu, right?

I don't see how this would be possible within the Tiki permission framework, but perhaps you can look at the Referer HTTP Header? Maybe check to confirm that it comes from the current domain?

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: 8556 Israel

Hello Rick and thanks for looking at this.

Rick Sapir / Tiki for Smarties wrote:
So... you want Anonymous visitors to be able to view the page, only if they arrive on the page from the link in the menu, right?


No, that not what I meant.

I want anonymous able to see the menu page module in the footer when they load https://tiki.org
But not be able to load directly the page (https://tiki.org/Shared_t_o_footer)

posts: 3665 United States
Bernard Sfez / Tiki Specialist wrote:

I want anonymous able to see the menu page module in the footer when they load https://tiki.org
But not be able to load directly the page (https://tiki.org/Shared_t_o_footer)


Ah.... got it. You can easily do this with CSS:

{if !$user}
<style type="text/css">
.page-data .twfooter {display:none}
</style>
{/if}


And if you want to make the page only available to admins, you could simply change it to something like:

{if $tiki_p_admin_wiki eq 'y'}
...
{/if}


Of course, this isn't perfect (as the user can always see the page's content in the source).

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: 8556 Israel
Rick Sapir / Tiki for Smarties wrote:
Ah.... got it. You can easily do this with CSS:


Yes there are several "coders" way. (CSS being the simplest).
I thought there could be an option or permission in Tiki as this seems to me a logical behaviour.
(have access to inner content but not the page where this content is stored).

A bit like we have the following permission: "Can view in module and feed the wiki pages reference (tiki_p_wiki_view_ref)".

Anyway, the question is in the forum... May be one day someone will find a (non-coder) solution. 😉


posts: 1562 Germany
Bernard Sfez / Tiki Specialist wrote:

...
Or Anon can see the page and so the content can be used in a module.
Or Anon can't see the page or the content.

Any ideas on this ?


Hello Bernard,
just a pointer idea:

We have a similar preference in Tiki Trackers, where we can set that users can view tracker content only (included) in wiki pages, but not (directly) in the tracker feature itself, respectively not the tracker item itself.

If I had to write your preference, that would be the first place I would look at and try to analyese wether I find a useful code snippet or concept.

Hth,
Torsten


Upcoming Events

1) 
TikiFestFosdem2023

Menu