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

Doesn't play well with page-inject plugin #18

Open
HunterDG opened this issue May 17, 2021 · 1 comment
Open

Doesn't play well with page-inject plugin #18

HunterDG opened this issue May 17, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@HunterDG
Copy link

HunterDG commented May 17, 2021

Unexpected behavior when attempting to inject a file_browser_plugin.md page into another page via [plugin:page-inject](/route/to/page)

I've played around a bit unsuccessfully. Sorry for lack of details. It's quite easy to duplicate.

@N-Parsons N-Parsons added the enhancement New feature or request label May 27, 2021
@N-Parsons
Copy link
Owner

There's a check in the code to ensure that the folder structure only gets evaluated on pages that have the file_browser_plugin template, so this is probably the cause. The check exists to avoid wasting effort on other pages where the twig variable won't be used, and I'm not familiar enough with the Page Inject plugin to know whether there's an easy way to detect this.

For now, if you want to get around this, you can either remove or update the following line: https://github.com/N-Parsons/grav-plugin-file-browser/blob/master/file-browser.php#L43

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

No branches or pull requests

2 participants