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

don't show _template in topic list #200

Open
nerdoc opened this issue Apr 27, 2019 · 2 comments
Open

don't show _template in topic list #200

nerdoc opened this issue Apr 27, 2019 · 2 comments

Comments

@nerdoc
Copy link

nerdoc commented Apr 27, 2019

I use templatebyname to create new pages from templates (the _template.txt file in that directory). I create a {{tag>blah}} tag in that template to list all files in that directory in the index page.
Because of that, the template itself is shown too in the list - which is completely undesired.

You can see an example here.

Wouldn't it be good to exclude _template files from being shown inside of {{topic>blah}} lists?
I first thought about a feature like "exclude certain pages from topic lists" - to make it even more generic - but came to the decision that it is something different.

I think templates are NEVER ought to be shown to the user, so it would be in all cases better to exclude them from lists in this plugin.

Is there a chance that you implement this?

@nerdoc
Copy link
Author

nerdoc commented Apr 27, 2019

Maybe it is not more than adding a condition to this line?

The template files all begin with _ or ~:

  • _yourfilename.txt
  • __yourfilename.txt
  • ~yourdirectoryname.txt
  • ~~yourdirectoryname.txt
  • ~_yourdirectoryname.txt
  • ~~_yourdirectoryname.txt

@Klap-in
Copy link
Member

Klap-in commented Oct 3, 2022

Maybe more handy to include it in the isVisible() function.
This page is not a normal 'visible' page.

public function isNotVisible($id, $ns="") {

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

2 participants