-
Notifications
You must be signed in to change notification settings - Fork 26
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
Only evaluate the first template definition #282
Conversation
Pages nested with the include plugin may contain several odt:template definitions. The option 'firsttemplatedefinitionwins' allows to have the first definition win the contest (true), or the last one (false).
...so it will keep the value consistent throughout one walkthrough, but be reset every time a new walksthrough is started
For the settings via syntax I did saw two other templates
https://www.dokuwiki.org/plugin:odt#configuration Further, it seems you are using tabs. Could you please change these in spaces? I understand this change as not completely backward compatible. So in the changelog we need to pay attention to it. |
This reverts commit 3d39435.
…, 'css_template', and 'odt_template', as well
@Klap-in Thanks for your comment! I wasn't aware of the other configuration options. Looks like I implemented my wiki when those were not existing, yet.
Here are the additions that could be made to the dokuwiki page of the odt plugin: In section "Configuration" - addition of:
In section "Templates support" - addition of a new paragraph right before the next section "PDF conversion":
Best regards |
Thanks for improving. With the new default setting the situation is indeed backward compatible. Nice that you propose already the documentation updates. |
I implemented it this way because I am using another private plugin which needs the same functionality. Also, since you have to actively opt-in the new behavior, you will have to manually set the configuration value and you're reminded therein of this dependency. I don't feel it's much of a burden to install another small plugin if you want/need this functionality. Also, there is way more code in that plugin than in this branch, here. You need an action handler, and a helper class. To integrate that code into plugin:odt seemed complicating the matter a lot in relativity to the few lines added within this branch. I did not want to blow up the odt plugin even more than it already is, just because of some niche functionality (I seem to be the first person to perceive the resolved problem). |
@Klap-in hi, you merged master into this branch - will you be going to merge the branch into master, too? |
Uses the usecounter plugin to be able to restrict multiple template definitions to the first one, instead of the last one.
Comes with a boolean configuration option
firsttemplatedefinitionwins
. If set to true, only the first template command will be evaluated. If set to false, the original behavior will be enacted, i.e. all commands are executing, which results in the last command actually setting the template.resolves #281