Login Menu Link

Permalink Browser Info Environment
Hi,

I'm loving the mega menu! Starting to get my way around it more now. I have a 2 questions I could some help with (I'm also new to concrete and not a developer).


I am trying to put some sub nav links in the mega menu that are for pages that require login for members of specific groups. So I create a group in the dashboard, then I go to the page and edit it's permissions so it's only viewable by the group. The thing, is it completely hides the link from the nav because it's only got permissions for logged in users from that group.

How do I make it so that the nav/page link appears in the menu, but once you click it you are presented with a login page. Similar to how the 'Log In' link works, but for a page link.

I know this may or may not be outside of the mega menu support, and if so, maybe you could share your expertise and let me know how to accomplish this?

Thank you!

Type: Ticket
Status: In Progress
conc5fan
View Replies:
jb1 replied on at Permalink Reply
jb1
Hi,
Thanks for your positive feedback, I appreciate it.

Sure, to help you out, there is a checkbox to control weather or not hidden pages are displayed in the Mega Menu. This is under the "Menu Items" tab and is called "viewing permissions". Here's a screenshot:
https://monosnap.com/file/7RRyxyGZEUsVKdI7ADOZj17TIhclxS...

When this is enabled, it should display the pages that you are part of the menu, even if the user does not have appropriate permissions.

The behaviour of redirecting to the core "login" page will depend on how you've configured ConcreteCMS in the dashboard. Off the top of my head it should redirect to the "login" page by default but it's been a while since I used that feature in Concrete.

The only catch is the Concrete caching system. By default, the Mega Menu "block record" is cached to speed up page loading. If you have "full page caching" enabled in the Concrete dashboard, that could interfere with your desired behaviour - it would end up showing the same result for all users, regardless of their login status. So you'll probably need to turn that off. Here's the doco about that:
https://documentation.concretecms.org/user-guide/editors-reference/d...

Hope this helps.

JB

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.1
Version Installed - 9.2.1
Database Version - 20230503095900

# Hostname
ip-172-26-2-191

# Environment
production

# Database Information
Version: 8.0.34
SQL Mode: NO_ENGINE_SUBSTITUTION

# Concrete Packages
Location Map (1.2.2), Magic Tabs (9.0.5), Mega Menu (2.0.4), Simple Gallery (2.1.0)

# Concrete Overrides
None

# Concrete Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
8.1.22

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
max_multipart_body_parts - -1
memory_limit - 128M
post_max_size - 40M
upload_max_filesize - 40M
zend.exception_string_param_max_len - 0
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.