Building Output - With only files linked or used

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
kivinen
Propeller Head
Posts: 36
Joined: Tue Jan 08, 2008 7:55 am

Building Output - With only files linked or used

Post by kivinen »

Hi, I have a project with a whole bunch of pages etc in many different folders. In this project I have many TOCs for different kinds of outputs, so basically I have one big project with many different topics covering many different categories of information.

My question is, when I build help (for example webhelp) and I have a small TOC (maybe like 5-10 pages) and then try to generate webhelp, I get the correct TOC in the output, but I also get all the other content in my project, regardless of whether it is used in the TOC or linked somehow.

Is this normal?

Do I need to create many small projects and only put the specific content there in those projects I want exported?

BR

Dave
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Building Output - With only files linked or used

Post by RamonS »

Unless you explicit exclude content it will be included in the output. Also, when anything in your project links to explicitly excluded content it is typically included to prevent a broken link.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Building Output - With only files linked or used

Post by LTinker68 »

kivinen wrote:Do I need to create many small projects and only put the specific content there in those projects I want exported?
No, you can keep it all in one project. You can even use just one TOC if you want. The trick is to use conditional tags. If you apply a conditional tag to a topic and the specific output target is set to exclude that conditional tag, then the topic and its reference in the TOC are removed from the output. If you apply a conditional tag to a TOC entry, then the TOC entry isn't included in the output but the topic itself is still included in the output, so it can still be accessed via links, searching, and the index, just not via the TOC.
RamonS wrote:Also, when anything in your project links to explicitly excluded content it is typically included to prevent a broken link.
Actually, doesn't it remove the hyperlink so that you can't try to access the excluded content?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
kivinen
Propeller Head
Posts: 36
Joined: Tue Jan 08, 2008 7:55 am

Re: Building Output - With only files linked or used

Post by kivinen »

hi, so just so I understand, does the same marking of content using conditonal tags also work for images and other resources?

So if I just mark certain folders (all folders except the folders of content I want) to be excluded, then none of those folders or the content in those folders will be output?

BR

Dave
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Building Output - With only files linked or used

Post by LTinker68 »

Yes. For instance, in my Resources/Images folder, I have multiple sub-folders that roughly match my content folders which are roughly set to the books in my TOC. Anyway, in one of those images sub-folders, I might also have two sub-folders labeled "OL" and "PR" for online and print, respectively. The images in the OL folder might be 500px wide maximum and be set to 96dpi, but the images in the PR folder might be 300dpi. I apply the online-only conditional tag to the OL folder and the print-only conditional tag to the PR folder. It's not as much of an issue for print outputs, since they only include items specified in the TOC, but the online output won't include the print-specific images in the output folder, so the output folder isn't bloated unnecessarily.

By default, if you don't apply a conditional tag to a folder or item, it'll automatically be included in the WebHelp output (print will depend on if the topic is in the TOC). If you want to exclude content, then you need to apply the conditional tag it will be included in and then exclude that conditional tag for the appropriate target. In other words, if you have a folder that you want to use only for online output, then you apply the online-only conditional tag to that folder, then in the WebHelp target you tell it to include the online only conditions and exclude the print only conditions. In the print target, you tell it to exclude the online only conditions and include the print only conditions.

You can also apply those conditional tags to content inside a topic. So one paragraph will be seen in the online output and the other paragraph will be seen in the print output.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
kivinen
Propeller Head
Posts: 36
Joined: Tue Jan 08, 2008 7:55 am

Re: Building Output - With only files linked or used

Post by kivinen »

Ok, thanks for the help, I will go check this out... One more question... Is it possible, do you know, to create conditional tags and apply them to templates, so that when I create a new topic based on a template, that the new content will take on these conditional tags by default...so that I only need to go in and edit those exceptional tags that I want to change?

Reason I ask is that I have an automated process which takes content submitted from users, then creates the topics automatically into certain folders based on certain criteria, and the topics are created based on a certain topic template. So I was wondering if I can apply a default condition tag like "online" to the topic template?

BR

Dave
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Building Output - With only files linked or used

Post by RamonS »

LTinker68 wrote:
RamonS wrote:Also, when anything in your project links to explicitly excluded content it is typically included to prevent a broken link.
Actually, doesn't it remove the hyperlink so that you can't try to access the excluded content?
Last time I checked it didn't, but that last time wasn't that recent. Maybe Flare 4 is smarter about this now.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Building Output - With only files linked or used

Post by LTinker68 »

kivinen wrote:Is it possible, do you know, to create conditional tags and apply them to templates, so that when I create a new topic based on a template, that the new content will take on these conditional tags by default...
Sorry, I don't know. I don't work with templates much. Theoretically it should work since applying a conditional tag adds a block of code to the <html> tag in a topic, so if that code is part of the template then it should appear in any topics derived from it. But you'd need to make sure that the name of the conditional tag is one that you use in all your projects. I'm not sure what happens if a topic references a conditional tag that isn't in the conditional tag set for the project. It would probably ignore it. So if you're using a custom conditional tag instead of one of the generic ones, then make sure you always add that conditional tag to the conditional tag set in the project, too.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
kivinen
Propeller Head
Posts: 36
Joined: Tue Jan 08, 2008 7:55 am

Re: Building Output - With only files linked or used

Post by kivinen »

Hi, ok, thanks, I will play around with it :) have a nice day !
dlogan
Jr. Propeller Head
Posts: 6
Joined: Thu Mar 19, 2009 7:41 am

Re: Building Output - With only files linked or used

Post by dlogan »

LTinker68 wrote:Yes. For instance, in my Resources/Images folder, I have multiple sub-folders that roughly match my content folders which are roughly set to the books in my TOC. Anyway, in one of those images sub-folders, I might also have two sub-folders labeled "OL" and "PR" for online and print, respectively. The images in the OL folder might be 500px wide maximum and be set to 96dpi, but the images in the PR folder might be 300dpi. I apply the online-only conditional tag to the OL folder and the print-only conditional tag to the PR folder. It's not as much of an issue for print outputs, since they only include items specified in the TOC, but the online output won't include the print-specific images in the output folder, so the output folder isn't bloated unnecessarily.
Hi, I've replied to another of your posts on this and am concerned I'm not going to find a way around this... we have one set of images (same dpi is good enough for our purposes) - most are used in the PDF output, but about 10% are used in the PDF AND web help output. I've set this up by putting putting print-only conditions on the p tag where the images are exclusively for PDF in the topic. Problem: all the images appear in the webhelp output folder even though only about 10% are used. I really don't want to have duplicate images and set conditions at the folder level - to me this defeats point of single-sourcing! Any ideas of other ways round this? Neither do I want to do post-compile deletion of images. Any other ideas?
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Building Output - With only files linked or used

Post by KevinDAmery »

Since you're using the same image for print and online formats, you don't need to duplicate the images. You *do* have to apply conditions at the file level, though, because Flare includes everything in the contents folders in online output unless explicitly told not to by condition.

You could make a feature request that Flare analyze the content and determine if it is linked to and automatically not include anything that doesn't have a link pointing to it, but currently Flare doesn't do that.

http://www.madcapsoftware.com/bugs/submit.aspx
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Post Reply