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

Templates: Where are "placeholders" and their values defined? #20

Open
martinboers opened this issue May 22, 2023 · 0 comments
Open

Templates: Where are "placeholders" and their values defined? #20

martinboers opened this issue May 22, 2023 · 0 comments

Comments

@martinboers
Copy link
Member

In this section of the Wiki:

https://github.com/PLCnext/PLCnext_CLI/wiki/Template-System#11placeholder-syntax

... it states:

In the PLCnCLI Template System, placeholders are denoted using the $(path.to.value) syntax. This notation allows the user to specify the path to the desired value in a hierarchical data structure. The path is evaluated by the PLCnCLI, and the corresponding value is inserted into the output file at the position of the placeholder.

The example includes the following placeholders:

$(file.name)
portStructs [in the foreach loop]
$(struct.file.format.include)
$(file.format.include)
$(file.namespace)
file.functions [in the foreach loop]
$(function.name)
function.hasImplementation
$(function.implementation)

It's not clear to me where these placeholders and their values are defined.

Is there a pre-defined set of placeholders, like "file", for all templates? If so, where can I see this set of placeholders?

Or, does each template need to define its own complete set of placeholders? If so, where and how is that done?

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

No branches or pull requests

1 participant