-
I am trying to create a note that has "variables" in it. I want to be able to define certain things at the top of a note, and have them listed in the bottom of the note (or a different note is OK too). Something similar as: $router_name = "main-campus-router" I'd like to code the note so that it can use this variable name: conf t So that that "actual" note lists the variable: What feature set do I need to be reading about on how to accomplish this? I've tried with "promoted attributes", but to no avail. I know there is the JS Frontend and Backend, but I don't know JS well enough to get the const variable to "print" into the note. If this is the right feature for this, can a very simple example be provided? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I was able to cobble together the following HTML code/render note to get the desired results but is there an easier way to do this?
|
Beta Was this translation helpful? Give feedback.
-
The way I would approach it would be to use promoted attributes to define the attributes. And then frontend JS + render note to print out the final text with interpolated variables. You can access the (promoted) attributes from frontend JS like this:
|
Beta Was this translation helpful? Give feedback.
The way I would approach it would be to use promoted attributes to define the attributes.
And then frontend JS + render note to print out the final text with interpolated variables. You can access the (promoted) attributes from frontend JS like this: