You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bit of a long shot, but I was wondering if there was any functionality that would get all the variables associated with a particular frame?
A bit of context. I have a text frame that contains three short text variables, a long text variable and a list variable. On selecting that text frame I want to get the objects for these five variables. So I can then display custom input fields for these five variables etc.
I'm able to get one of the five variables by setting the variable in the text frame's "Frame Link Settings" in the Chili BackOffice and using the following:
I guess this is more a support request than a question related to the publisher interface but I use something that might help you:
You can use Private Data Input which allows you to associate name/value pairs to a frame.
You could set into your document frame the following name/values pairs:
variable => 'short text 1'
variable => 'short text 2'
variable => 'short text 3'
variable => 'long text 1'
variable => 'list 1'
Then, you will be able to retrieve them by calling:
You can then compare/associate them to your input values.
If you have many frames, you should make an abstraction to easily make the bond between your private data and your variables.
I am way late to the party, but no there is no way I know of to get all variables in a text frame natively in CHILI
The private data as suggested is a good workaround. Another option is to parse the textflow of a frame for all the variables. You can get the textflow from: await publisher.getObject('document.selectedFrame').textFlow
Bit of a long shot, but I was wondering if there was any functionality that would get all the variables associated with a particular frame?
A bit of context. I have a text frame that contains three short text variables, a long text variable and a list variable. On selecting that text frame I want to get the objects for these five variables. So I can then display custom input fields for these five variables etc.
I'm able to get one of the five variables by setting the variable in the text frame's "Frame Link Settings" in the Chili BackOffice and using the following:
But this is obviously only one of the five.
I'm also aware that I can get all of the variables in the document by using the following:
await publisher.getObject("document.variables");
and then loop through etc as in the Chili Publisher documentation. But I just want the five variables associated with this frame.
I've had a look through the Chili Publisher docs, but I was curious if anything like the following exists:
Or if there is any other way to possibly achieve this functionality? Or if I'm going about it in the complete wrong way.
Any help at all would be appreciated.
Cheers
The text was updated successfully, but these errors were encountered: