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

Add alternative syntax to add entire namespace #70

Closed
wants to merge 1 commit into from

Conversation

micgro42
Copy link
Contributor

The are scenarios where it is desirable to enforce the creation of a new namespace instead of only creating a new page.

This adds the alternative Syntax {{NEWNS}} which effectively only appends an : to the id. All templates, options, etc. can still be used just the same.

Please let me know what you think and if you'd like any adjustments.

The are scenarios where it is desirable to enforce the creation of a new
namespace instead of only creating a new page.
splitbrain added a commit to cosmocode/dokuwiki-plugin-addnewpage that referenced this pull request May 29, 2017
* @input@ placeholder can be used to reference the given input (useful
  to create a new namespace) makes dregad#70 obsolete
* new ? syntax to overwrite config options from the syntax (defaults
  still come from the config setting)
* support for strftime placeholders in the namespace config. Allows to
  create a daily page for example
* New option autopage which hides the input field. Together with the new
  date placeholder this allows to create a daily page on a single button
  click
@dregad
Copy link
Owner

dregad commented May 7, 2023

Superseded by #72

@dregad dregad closed this May 7, 2023
dregad added a commit that referenced this pull request Nov 16, 2024
Merge pull request #102 from dregad/pr72.

This is @splitbrain's original contribution (see PR #72), with merge
conflicts resolved and some additional code cleanup and fixes, including
French translation.

* a new `@INPUT@` placeholder can be used to reference the given input
  in namespace setup. For example you could use something like
  `{{NEWPAGE>foo:@input@:start}}` to let users create new namespaces
  inside the `foo` namespace. This makes #70 obsolete
* a new `?` syntax allows to overwrite config options from the syntax
  (defaults still come from the config setting). Example:
  `{{NEWPAGE>foo:bar?nohide}}` overwrites the default `hide` setting.
* support for strftime placeholders in the namespace config. Allows to
  create a daily page for example. Example:
  `{{NEWPAGE>projekt:notes:%Y-%m-%d}}`
* New option autopage which hides the input field. Together with the new
  date placeholder this allows to create a daily page on a single button
  click. Example: `{{NEWPAGE>journal:%Y-%m-%d?noautopage}}`
* Includes changes of #71 (always use id of main page in replacements)
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

Successfully merging this pull request may close these issues.

2 participants