Skip to content

Print First Header instead of PageID #17

@joda55

Description

@joda55

Feature Description

Currently ACK listing displays ugly page IDs instead of well-formatted titles (employees_policy_it_global instead of IT-Security Policy for Employees). Currently I do apply the following patch after every update, maybe you'd like to include it in the code base. However if someone really likes ugly page IDs, maybe adding a config flag would be a smart solution?

--- listing.php	2024-10-30 17:22:49.284666660 +0000
+++ dokuwiki/lib/plugins/acknowledge/syntax/listing.php	2024-10-30 17:24:34.996663707 +0000
@@ -89,7 +94,11 @@
                     . sprintf($this->getLang('ackGranted'), dformat($item['ack']))
                     . '">&#x2714;</span>'
                     : '';
-                $html .= '<li>' . html_wikilink(':' . $item['page']) . $done . '</li>';
+                $first_heading = p_get_first_heading(':' . $item['page']);
+                if($first_heading)
+	            $html .= '<li>' . html_wikilink(':' . $item['page'], $first_heading) . '</li>';
+                else
+	            $html .= '<li>' . html_wikilink(':' . $item['page']) . '</li>';
             }
             $html .= '</ul>';
         }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions