Tips and tricks for the Custom Links module
You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules
The Custom Links module doesn't have a documentation page. So in the meantime I'm writing these tips here, in the Flag module's handbook.
How to add a link visible to anonymous users only?
Custom Links doesn't support showing a link to users belonging to a specific role (e.g., "anonymous users"), so you'll have to use a dirty trick: assign anonymous users, only them, some "silly" permission. Something that's harmless. An easy solution is to install the Site Configuration Permissions, which lets you create a permission.
Then, under Custom Link's "Viewer permission restriction" choose this permission.
(Note: administrators will still see this link.)
How to make the link a simple SPAN?
Sometimes you want the link to be just a message. You don't want it to be a link pointing anywhere. To do this you'll use another dirty trick:
Say the link's title is "Something I want to tell you". Change it to "</a>Something I want to tell you<a>" and tick the "Title uses HTML" checkbox.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion