In the issue queue for the Footnotes module it was mentioned that footnote links, i.e. links to anchors within the node, are listed in print view: #687676: Disable footnotes outside of the normal view

This does not always make sense, since footnote links are not necessary in print view. The feature request is to exclude footnote anchors from print view. Maybe an option could be given to a) exclude footnotes module's anchors or b) exclude anchors altogether.

Footnotes related links can easily be identified "by looking at the span and ol html elements that are identified by footnotes specific class attributes", as the developer of the module stated.

CommentFileSizeAuthor
#3 print-735260.patch3.97 KBeikes
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcnventura’s picture

Status: Active » Closed (duplicate)
eikes’s picture

to exclude anchors from appearing in the list of links you can comment the block in print.pages.inc which looks like this:

        if ($url[0] == '#') {
        /*
          // URL is an anchor tag
...
          $matches[1] = str_replace($url, $_GET['q'] . $url, $matches[1]);
        */
        }

maybe there ought to be a checkbox on admin/settings/print/common which makes anchors optional?

eikes’s picture

Status: Closed (duplicate) » Needs review
FileSize
3.97 KB

ok, so here's the patch for this problem. With it you can choose if you want to have anchor-links in the list or not.

Anonymous’s picture

Subscribe

jcnventura’s picture

Status: Needs review » Fixed

Hi,

Indeed, named anchors in the URL list are not really necessary, so they're now disabled by default. I have committed your patch with a few modifications.

Thanks for the patch!

João

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.