dokuwiki-plugin-struct icon indicating copy to clipboard operation
dokuwiki-plugin-struct copied to clipboard

New value placeholder for NS and ID

Open moz0817 opened this issue 1 year ago • 0 comments

Feature Description

I like to use header files to automatically render struct data for multiple pages. For me, an additional placeholder (e.g. $NSID$) would be very useful. On start pages it behaves like $NS$, and on wiki pages it behaves like $ID$.

This means I can write filter: foo *~ $NSID$ in the header and get all the namespace hits on start pages, and only the corresponding ones from wiki pages.

The required changes in are minimal. Unfortunately I have no idea about push requests otherwise I would have done that. File: meta/SerachConfig.php Function: applyFilterVars()

global $conf; // ++++++++++ ... array( '$ID$', '$NS$', '$NSID$', // ++++++++++ ... ), array( $INFO['id'], getNS($INFO['id']), preg_replace('/' . $conf['start'] .'$/', '', $INFO['id']), // ++++++++++

The query on start pages can probably also be implemented differently.

moz0817 avatar Mar 22 '24 11:03 moz0817