Easily hide/show content at global level

This forum is for all Flare issues not related to any of the other categories.
Post Reply
kerimucci
Propeller Head
Posts: 59
Joined: Thu Nov 02, 2017 3:38 am

Easily hide/show content at global level

Post by kerimucci »

My team needs to append the word "preview" to certain section headings throughout our project and then quickly remove it when a feature we are writing about is made available to all customers. I am not sure how easily this can be done.

The only way I can think of this working is by:
  • Creating condition tags for each preview feature
  • Applying the conditions to the word "preview" in each relevant topic
  • Switching the condition tags on/off in each relevant target.
This is a lot of work due to us having many targets, and it would also create a massive list of condition tags that we'd eventually need to clear out. We'd also have leftover "preview" tags in the content, even if they don't display in our output.

Is there a better way to do this?
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Re: Easily hide/show content at global level

Post by scap »

.........................
Last edited by scap on Thu Nov 02, 2023 4:16 am, edited 1 time in total.
scap
Propeller Head
Posts: 55
Joined: Tue Jun 28, 2022 7:36 am

Re: Easily hide/show content at global level

Post by scap »

That seems as reasonable an approach as any, this kind of thing is a bit of a pick your poison exercise.

If all 'preview tags' need removed before a final build you can do a search replace.

e.g. replace something like this with nothing

<MadCap:conditionalText MadCap:conditions="Docs.Preview">PREVIEW</MadCap:conditionalText>

---

Even simpler without conditionals, just add something like <p>PREVIEW_</p> before each relevant section heading, then so a search replace on that. If you need formatting to make the PREVIEW_ stand out, make a new class.

p.preview
{
color: red;
font-size: 20pt;
}

And apply the class to each preview entry:

<p class="preview">PREVIEW_</p>

That would cut out all the work needed adjusting conditionals in the Targets.
kerimucci
Propeller Head
Posts: 59
Joined: Thu Nov 02, 2017 3:38 am

Re: Easily hide/show content at global level

Post by kerimucci »

Thank you.

I am actually considering creating a new variable set for this, where I have one variable per feature. This would allow us to quickly delete "preview" from the definition, but then we'd need to do a find and replace for all instances where we inserted it.
Post Reply