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

Using dynamic values in naming syntax #31

Open
Anonymous215025 opened this issue Jun 27, 2020 · 1 comment
Open

Using dynamic values in naming syntax #31

Anonymous215025 opened this issue Jun 27, 2020 · 1 comment
Labels
enhancement New feature or request Hacktoberfest

Comments

@Anonymous215025
Copy link

Anonymous215025 commented Jun 27, 2020

Right now, you have to manually define the namespace and image name in the syntax:

{{drawio>namespace:image-name}}

It would be really good if we can use dynamic values where

namespace = @ns@ and it refers to the namespace the page is on.
image-name = @file@ referring to the page id.

So let's say you have a chocolate cake recipe diagram, instead of writing out

{{drawio>food:chocolate_cake_diagram}}

You write:

{{drawio>@NS@:@FILE@_diagram}}

And it will get you the above. Having this dynamic naming scheme allows a lot of flexibility and easier copy and pasting to other pages to generate its own name.

Here are more examples (https://www.dokuwiki.org/namespace_templates). Thank you!

@lejmr
Copy link
Owner

lejmr commented Jul 7, 2020

Oh thank you. I did not even know anything like this is possible. Will put it on list of features. Feel free to send me back a pull request

@lejmr lejmr added the enhancement New feature or request label Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants