Opened 7 years ago

Closed 7 years ago

[Patch] Headings should contain ids for anchors to work

Reported by: Owned by: Mitar Odd Simon Simonsen normal FullBlogPlugin normal 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.

comment:1 Changed 7 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 7 years ago by Mitar

Attachment: anchor.patch​ added

comment:2 Changed 7 years ago by Ryan J Ollos

Summary: Headings should contain ids for anchors to work → [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 7 years ago by Ryan J Ollos

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

comment:4 Changed 7 years ago by Odd Simon Simonsen

Resolution: → fixed new → 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.

Modify Ticket

Action
as closed The owner will remain Odd Simon Simonsen.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

Note: See TracTickets for help on using tickets.