Variables, Snippets, Conditions - Outthinking myself - Help?

This forum is for Single-Sourcing your Flare content to multiple outputs.

Variables, Snippets, Conditions - Outthinking myself - Help?

Postby LookingForHelp on Tue May 02, 2017 1:57 pm

Situation:
1 Output.
50 topics. Topic = Contract Information.
Each topic has 5 snippets.
Each snippet is formatted with standardized content and layout.

One example of a smaller snippet is Contact Info which has
[*]Main Phone Number
[*]Phone Tree 1 Option
[*]Phone Tree 2 Option
[*]Phone Tree 3 Option
[*]Phone Tree 4 Option

I was planning on creating a Variable Set of 50 ContractName (one for each topic) with variables likes:
ContractName.PhoneNumber
ContractName.Tree1
ContractName.Tree2
ContractName.Tree3
ContractName.Tree4

I'm stuck on trying to insert the System.Title as ContractName to make it truly set and forget snippet and as such I'm kinda stuck. I feel like I've wandered down the rabbit hole too far to see how I should set this up.
Help me Obi Wan...
Last edited by LookingForHelp on Tue May 02, 2017 3:49 pm, edited 1 time in total.
LookingForHelp
Jr. Propeller Head
 
Posts: 6
Joined: Tue Apr 18, 2017 11:33 am

Re: Variables, Snippets, Conditions - Outthinking myself - H

Postby Nita Beck on Tue May 02, 2017 3:26 pm

Sorry but I'm having trouble figuring out what you're trying to do. You say you will have a "Variable Set of 50 ContractName (one for each)..." One for each what? And why do you want to use the built-in System.Title variable as ContractName? (Sorry, it's been a long day...) Do you need both variables and snippets to populate the phone numbers? Can you get away with just snippets?

One of my foundational design principles is that, when faced with complexity, I always seek the simplest solution. The simplest solution is easier to implement, to document (so another Flare author understands the design), and to maintain (by oneself and/or another Flare author).
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3290
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Variables, Snippets, Conditions - Outthinking myself - H

Postby LookingForHelp on Tue May 02, 2017 4:07 pm

* Edited (one for each topic)
Hi,
What I'm trying to do is have a snippet for a skeleton of a table with variable placeholders for each piece of contact information in those table cells.
Insert that snippet in the ContractName Topic. Ideally I would love it if it could read the System.Title so it would then pull the appropriate ContractName.Variables into that snippet without the need for heavy lifting:
"I'm in ContractABC Topic so I'm going to use the ContractABC VariableSet."

Topic - ContractABC.htm
Generic Snippet - Contactinfo.flsnp
Variable - ContractABC.flvar

Flare might do it natively - hence System.Title idea to help with mapping? Maybe some clever javascript?

Thanks for any brain inputs :)
LookingForHelp
Jr. Propeller Head
 
Posts: 6
Joined: Tue Apr 18, 2017 11:33 am

Re: Variables, Snippets, Conditions - Outthinking myself - H

Postby Nita Beck on Wed May 03, 2017 6:26 pm

I think what you're seeking isn't something that Flare is programmed to do. I personally have no idea if you could create a Flare plug-in or add any Javascripting as you've suggested. Sorry. :( Perhaps someone else has an idea.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3290
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Variables, Snippets, Conditions - Outthinking myself - H

Postby Dave Lee on Wed May 10, 2017 5:09 am

So you have 50 topics, and are going to create 50 variable sets, one for each topic.

But if the variables are just static text though, and don't change per output, then why bother using variables?
It'd be easier to type in the information directly into the topic, and not use variables.

You could use a snippet as a template for the topics; e.g. create the topic layout in the snippet, insert it into each topic, then convert the snippet to text.


As for javascript - bear in mind that javascript is run by the browser in the built output. Variables are are applied as part of Flare's build process, meaning no javascript can be run at this point, so you can't use javascript to interact with Flare variables.
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 3 guests