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?
Snippets within snippets within snippets - not showing
-
- Sr. Propeller Head
- Posts: 125
- Joined: Thu Mar 05, 2015 4:24 am
- Location: Chesterfield, Derbyshire, UK
- Contact:
-
- 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
Just a guess; is it anything to do with the order of the snippets?
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
-
- 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
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.
Re: Snippets within snippets within snippets - not showing
Snippet conditions set at the topic level can affect the display of snippet content, if your snippets have conditional tagging.
-
- 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
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?
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?
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Snippets within snippets within snippets - not showing
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.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?
Nita
![Image](http://forums.madcapsoftware.com/download/file.php?id=2449)
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
- 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
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.
-
- 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
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.
<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.
-
- 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
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?