Can you ignore the "Content" folder structure when building?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
writer_sam
Propeller Head
Posts: 26
Joined: Thu Sep 14, 2017 6:38 am
Location: Dorset, UK

Can you ignore the "Content" folder structure when building?

Post by writer_sam »

Hello All,

Apologies if this is in the wrong forum topic, I couldn't see where it should go.

Does anyone know if you can have Flare ignore the project's Content folder structure when building output??

I've got a large Flare project that when built is my whole product's help. From time-to-time, I need to build a subset of this project - not a problem so far as I've got different targets, condition tags, and TOCs. However, when built, the output "honours" the source project's content folder. I have "Do not use Content folder in output" selected in my target build, but the sub-folder structure is still there.

My project's folder structure looks like this:

Content
-> Folder_1
----> Topic_1.1
----> Topic_1.2
----> Topic_1.3
-> Folder_2
----> Topic_2.1
----> Topic_1.1
-> Folder_3
----> Topic_.1
-> Topic_A.htm
-> Topic_B.htm
-> Topic_C.htm
-> Topic_D.htm
-> Home.htm

Sometimes, I just need to build an output that has the contents of Folder_1 only. I build a TOC for the Folder_1 topics only, and create an HTML 5 target with the relevant conditions and "Do not use Content folder in output" selected. My output structure looks like:

Folder_1
--> Topic_1.1
--> Topic_1.2
--> Topic_1.3
Data
Resources
Skin
Default.HTM

Is there a way to have Flare output Topic_1.1 to Topic_1.3 in the main output folder itself, without splitting my project up??
If I have to split my project into smaller projects then link them when building the main one, how do you do this?? :?

Thanks in advance!
To err is human, but to really foul things up you need a computer.
AlexFox
Sr. Propeller Head
Posts: 161
Joined: Thu Oct 19, 2017 1:56 am

Re: Can you ignore the "Content" folder structure when build

Post by AlexFox »

Hi, I think you may be confusing some options here,

When you tick the Do not use "Content" folder in output box, you're telling Flare not to put all of your files in the generated output into it's own Content folder.

e.g. with the box unticked your output files would look something like this:

Content/ (in here would be all of your project content, i.e. Folder 1 containing Topic 1.1, 1.2 and 1.3 and Folder 2 containing it's relevant Topics)
Data/
Resources/
Skins/

etc.

With the box ticked however, you'd see something like this:

Folder_1/Topic_1.1 etc.
Folder_2/Topic_2.1 etc.
Data/
Resources/
Skins/

(You get the idea).

That tick box essentially just tidies up your output a little at the cost of adding an extra folder to all the files paths.

If your issue is that you are getting content generated that isn't in your TOC, then make sure you tick Exclude content not linked directly or indirectly from the target box, as this will generate the entire project, even if your TOC cannot navigate to it.

Now regarding building just a part of this output and merging it together, I would highly advise against trying to do this manually, but if you are looking to merge multiple small projects into one at runtime, then check this link out.

Cheers!
writer_sam
Propeller Head
Posts: 26
Joined: Thu Sep 14, 2017 6:38 am
Location: Dorset, UK

Re: Can you ignore the "Content" folder structure when build

Post by writer_sam »

'Fraid to say, AlexFox, you've got the wrong end of the stick.

For my subset builds, I have the "Exclude" option enabled (which works a treat). I don't have a "Content" folder in my output as I have enabled the "Do not use Content folder in output" parameter, as you correctly point out.

What I need is for a similar behaviour as the "Do not use Content folder in output" parameter, but for it it be something like "Do not use 'Folder_1' in output.

Thanks for the link, I'll take a look. But given how mature my source is, I'm hoping someone will have a way of doing what I need without pulling apart the project :D
To err is human, but to really foul things up you need a computer.
AlexFox
Sr. Propeller Head
Posts: 161
Joined: Thu Oct 19, 2017 1:56 am

Re: Can you ignore the "Content" folder structure when build

Post by AlexFox »

Sorry for my confusion, I think I get what you're on about now. Basically you want the file structure to reflect the TOC exactly? As far as I'm aware you can't do this. The TOC is all managed through JS and your output will always reflect the structure of your Content files (+/- the Content folder as discussed). :(
writer_sam
Propeller Head
Posts: 26
Joined: Thu Sep 14, 2017 6:38 am
Location: Dorset, UK

Re: Can you ignore the "Content" folder structure when build

Post by writer_sam »

For those in a similar predicament and looking for a resolution, thought I'd post a solution:

I had to swallow a bitter pill and split my gigantic project into smaller projects, with a global project contaning the shared images, snippets, variables, and condition tags. Takes a while to get used to, especially when you have to go back to the global project just to add a conditioned product name to a snippet and re-import it. Build time is all fine for the moment, as I'm just building the smaller project targets separately and can control whether the "Content" folder is included or not. However, I was still stumped as to what happens when it comes to building my mega-target — having HTML5 Top Nav outputs meant that I couldn't do a "project merge at target runtime" type of thing as it's just not supported.

Then last night, I attended one of MadCap's webinars and the very same predicament was discussed. How awesome was that! The solution — make the mega-project another imported project, where the contents come from the smaller projects. Such a simple solution that was there all the time, just had to take my single-sourcing thinking to the next level. You need to ensure the "Auto-import before Generate output" is enabled, and that you don't have similar filenames in the imported smaller projects. I've done a test and though I need a good sort-through for each project, I think I'm 98% there to getting my mega-target project built. Whoop!
To err is human, but to really foul things up you need a computer.
Post Reply