Get name of current page into expression? #2967
Replies: 2 comments
-
There is a variable |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, it does... I looked for such but must have missed it... will look again. Searched under 'name' and tried 'page'... no match. But since it is 'this' object, created a button, set title of button to expression, and then $(this:page)... that worked! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Get name of current page into expression? There does not seem to be a 'current' page name variable? There is $(this:page), but that is page index. Is there a way to convert this or use this to get the actual page name?
There is also internal variable for page name, but that is static page index in the variable name... say $(internal:page_number_1_name).
I guess what I need is a bit of code to inject $(this:page) into $(internal:page_number_1_name), something like $(internal:page_number_$(this:page)_name).
But of course this will not evaluate correctly as is. I am not that versed in JavaScript to code smith this to get an expression to parse the syntax right, but maybe some has already done this? Or there is a better way to attempt to get the page name into an expression for say button on the same page?
Say page is "XXX' and I want a button on said page to be named 'XXX My Button' for example.
Beta Was this translation helpful? Give feedback.
All reactions