Permalink Block

Categories

SEO

Component ID

1876314

Component name

Permalink Block

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

1784

Component created

Component changed

Component body

A block with a simple link to the current page. The URL contains the node or term ID instead of the alias, so the link won't break if the title changes. Hence the term permalink. It works also on Views generated pages or user profiles, aliased or not.

Optionally use an HTML snippet (copybox), providing an easy way for visitors to deep link to your pages on other sites. Also a popup can be used.

Popup on hover or click
The 'copybox' can be suppressed to have only a simple link that can be copied with right-click (instruction provided on hover).

By default the block is enabled at the bottom of the theme's 'content' region on all non-admin pages. This shows a permalink to the current page and a copybox to ease pasting of the necessary HTML into other websites.

Less intrusive for the visitor is the use of a popup that appears only when hovering over the 'Permalink' with the mouse (see image). To activate this functionality, just enable the BeautyTips or Popup module.

Features

  • Works on all pages, not only on nodes but also on Views, taxonomy and user pages.
  • Optionally, use the less intrusive popup (recommended).
  • Fine-grained block control when and where to display.
  • The displayed HTML snippet results in a link with the title of the current page that on mouse hover shows the domain and slogan (as the link 'title' attribute).
  • Easy to customize, thanks to a CSS and template file

Configuration

  • Configuration as any other block at /admin/structure/block/manage/permalink_block/permalink/configure.
  • To use a popup, enable the BeautyTips or Popup module.
  • Remember that you can set a popup style on the configuration page of your module of choice.

Customization

1.) To change the style of the block (for example the background color or font size):

  1. Copy & paste the code in the permalink_block.css into your theme's custom CSS file.
  2. Make your changes.
  3. Clear both your browser and site cache.

2.) Using a template file. Easy to override to alter the output. Read the code comments.
To change the content in the block:

  1. Copy the permalink_block.tpl.php file to your theme's template folder.
  2. Make your changes.
  3. Clear the site cache at '/admin/config/development/performance'.

To override the string "Permalink" or the help text, you can also use the module String Overrides. It provides an easy way to replace any text on your site that is wrapped in the t() function.

Related projects

The Permalink module offers similar functionality for D6. For the differences see http://drupal.org/node/917408#comment-6887920.

Cross browser tested

The HTML generated by this module has been tried on many different browsers and mobile devices using BrowserStack.