Snippets within snippets within snippets - not showing

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
StraygoatWriting
Sr. Propeller Head
Posts: 125
Joined: Thu Mar 05, 2015 4:24 am
Location: Chesterfield, Derbyshire, UK
Contact:

Snippets within snippets within snippets - not showing

Post by StraygoatWriting »

Hi everyone,

I have a project where there is a need to have snippets within snippets within snippets. This is how the customer wants it to work:

<snippet>Common Section to be included in several projects
<snippet>job title snippet
<snippet>individual's email address snippet</snippet>
</snippet>
</snippet>

The reason for this is that people in the organisation change roles a lot, but keep the same email address. They want to be able to manage this easier, by just changing the personal email snippet for each job title snippet as and when changes happen.

The problem is that these 3-tiered snippets aren't displaying properly. Some seem to work fine, but others look fine in the code, but are blank in the output.

Anyone have any idea why this happens?
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Snippets within snippets within snippets - not showing

Post by SteveS »

Just a guess; is it anything to do with the order of the snippets?
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
StraygoatWriting
Sr. Propeller Head
Posts: 125
Joined: Thu Mar 05, 2015 4:24 am
Location: Chesterfield, Derbyshire, UK
Contact:

Re: Snippets within snippets within snippets - not showing

Post by StraygoatWriting »

I'm not sure how the order of snippets could affect it. It also seems to be inconsistent, as some snippets display fine when they are 3 snippets-deep, but others don't. They were all inserted via drag and drop, so it isn't (or rather shouldn't be) a path problem.
whunter
Sr. Propeller Head
Posts: 429
Joined: Thu Mar 12, 2009 4:49 pm
Location: Portland, OR

Re: Snippets within snippets within snippets - not showing

Post by whunter »

Snippet conditions set at the topic level can affect the display of snippet content, if your snippets have conditional tagging.
StraygoatWriting
Sr. Propeller Head
Posts: 125
Joined: Thu Mar 05, 2015 4:24 am
Location: Chesterfield, Derbyshire, UK
Contact:

Re: Snippets within snippets within snippets - not showing

Post by StraygoatWriting »

There are conditions on part of the topic level, but how does that affect the display of snippets? For example, the topic is something like this:

This is the intro paragraph.

This is more detailed explanation.

This is an extra bit of information that is conditional - only appears in one specific output.

For more details, contact the <job role snippet> at <job role email snippet><person's email snippet /> </job role email snippet>.


One thing I didn't mention is that the project is set up as a global project, with all snippets in the global imported into 5 different child projects. I'm wondering if the cause of the problem is that the snippet that isn't showing hasn't imported right? It usually says missing snippet, but maybe that doesn't happen when it is embedded in another one?
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Snippets within snippets within snippets - not showing

Post by Nita Beck »

StraygoatWriting wrote:One thing I didn't mention is that the project is set up as a global project, with all snippets in the global imported into 5 different child projects. I'm wondering if the cause of the problem is that the snippet that isn't showing hasn't imported right? It usually says missing snippet, but maybe that doesn't happen when it is embedded in another one?
Maybe the snippets aren't showing up is because they are present only in the child projects, so the snippets will all resolve just fine when you build from the child projects. I've actually set up some of my global snippets this way; they expect there to be a snippet with a certain name in a certain location, but that name and location are for the child project, not for the global projects. So if I build from the global project (which I wouldn't do normally), I'll get missing snippets. But if I build from a child project, then all the snippets resolve as intended. It's complicated, I know, but it's also actually elegant in the structuring.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
StraygoatWriting
Sr. Propeller Head
Posts: 125
Joined: Thu Mar 05, 2015 4:24 am
Location: Chesterfield, Derbyshire, UK
Contact:

Re: Snippets within snippets within snippets - not showing

Post by StraygoatWriting »

Thanks Nita. I think you may be right. I've not actually built it myself - the customer reported the problem - I've just seen the snippet files. I will look into it today...the snippet not being in the child project seems to be a likely culprit.
StraygoatWriting
Sr. Propeller Head
Posts: 125
Joined: Thu Mar 05, 2015 4:24 am
Location: Chesterfield, Derbyshire, UK
Contact:

Re: Snippets within snippets within snippets - not showing

Post by StraygoatWriting »

Aha! Fixed it. The snippet link had Block instead of Text. Changing it to text worked.

<MadCap:snippetBlock src="../Dan_McCarthy_Email.flsnp" /> didn't work (and not sure where the 'block' came from).

<MadCap:snippetText src="../Dan_McCarthy_Email.flsnp" /> does work.

Case closed.
StraygoatWriting
Sr. Propeller Head
Posts: 125
Joined: Thu Mar 05, 2015 4:24 am
Location: Chesterfield, Derbyshire, UK
Contact:

Re: Snippets within snippets within snippets - not showing

Post by StraygoatWriting »

Thinking about it, it should have worked with the block snippet shouldn't it? I would have expected the block snippet to just force the snippet onto a line on its own, with the rest of the text after it. That didn't happen, so maybe there is a bug here?
Post Reply