Modify

Opened 4 years ago

Closed 4 years ago

#6025 closed enhancement (fixed)

[Patch] Headings should contain ids for anchors to work

Reported by: mitar Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Posts and lists sections headings (h*) should contain ids for anchors to work.

Then it is possible to add to site.html to <head> something like:

<script type="text/javascript">
  jQuery(document).ready(function($) {
    $("#content").find("h1,h2,h3,h4,h5,h6").filter("[id]").addAnchor("Link to this section");
  });
</script>

to enable anchors.

Attachments (1)

anchor.patch (1.6 KB) - added by mitar 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 4 years ago by mitar

I am attaching a patch which adds ids. Post names are unique. Also sections in listings are. So we just have to take care of proper anchor names.

Changed 4 years ago by mitar

comment:2 Changed 4 years ago by rjollos

  • Summary changed from Headings should contain ids for anchors to work to [Patch] Headings should contain ids for anchors to work

I'd find this to be useful as well. Would you consider integrating into the trunk?

comment:3 Changed 4 years ago by rjollos

It looks like this patch did not upload, as in #6022.

comment:4 Changed 4 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

(In [7225]) FullBlogPlugin: Adding anchors to listings. Works for regular listings, archive and listings using macro. Thanks to mitar for suggestion and patch. Closes #6025.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from osimons. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.