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

Relative namespace search #10

Open
cjohnsonuk opened this issue Sep 29, 2022 · 0 comments
Open

Relative namespace search #10

cjohnsonuk opened this issue Sep 29, 2022 · 0 comments

Comments

@cjohnsonuk
Copy link

cjohnsonuk commented Sep 29, 2022

Can it be made so that you can specify the namespace to search relative to the current page like described in the namespaces help page:

Links relative to the current namespace may also begin with either “.” or “.:” (“..” or “..:” for parent namespace).

Eg1
{searchform ns=.: } or {searchform ns=. }
will search in the current name space
Eg2
{searchform ns=.:policies }
will search in the polices sub-namespace of wherever the page is

That way I can use the variables and include plugins and have a standard "search" section defined centrally that I can refer to from other pages.

======search======
===== Searching in the @NS@=====
You can use the search box at the top of the page to carry out a search of all documents in the wiki or the form below to search just the @NS@section : 

{searchform ns=.:}

More search syntax options can be found [[https://www.dokuwiki.org/search|in the documentation]].

that will allow me to include in any page:

{{section>:common_elements#search&noshowheader}}

or have as part of a page template.

I gave it a go to see if it would work but it ignored the . and .: and just searched the whole wiki.

I tried using @. or @.: in the standard page search at the top of the default template and it ignored them.

I had a quick look at the code for the plugin but wasn't able to see how to get the ns of the current page if the ns string passed as a parameter in the markup was either . or .:

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

No branches or pull requests

1 participant