Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New value placeholder for NS and ID #712

Open
moz0817 opened this issue Mar 22, 2024 · 0 comments
Open

New value placeholder for NS and ID #712

moz0817 opened this issue Mar 22, 2024 · 0 comments

Comments

@moz0817
Copy link

moz0817 commented Mar 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant