System variable for path-independent references?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

System variable for path-independent references?

Post by chrispitude »

Hi all,

I am writing an in-house conversion tool from our legacy format to Flare. One of the messy parts is due to the directory structure, I find myself having to reference files like this:

Code: Select all

<a href="../../../../shared/some_file.htm">
...
<table style="width: 100%;mc-caption-repeat: true;mc-table-style: url('../../../Resources/TableStyles/OurTables.css');">
And this varies depending on how deep in the directory structure I am.

Is there a method for specifying paths relative to the project (or Content) directory instead of relative to the current file, so that I don't have to try to figure all this out in my conversion tool? Thanks!
SKamprowski
Sr. Propeller Head
Posts: 277
Joined: Fri Feb 13, 2015 8:25 am
Location: Germany

Re: System variable for path-independent references?

Post by SKamprowski »

Hi,

why don't you use the same structure in Flares content that your original files have? If you want to change it later, Flare updates links in all source files.
Kind regards,
Sabine Kamprowski
DocToHelp MVP (by ComponentOne)
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: System variable for path-independent references?

Post by chrispitude »

SKamprowski wrote:Hi,

why don't you use the same structure in Flares content that your original files have? If you want to change it later, Flare updates links in all source files.
Part of the conversion is taking a flat directory of many hundreds of files, and "directorifying" them. I do understand that file structure has no bearing on delivered content structure, but a single directory that large is too big to work with.
SKamprowski
Sr. Propeller Head
Posts: 277
Joined: Fri Feb 13, 2015 8:25 am
Location: Germany

Re: System variable for path-independent references?

Post by SKamprowski »

Hi,

I misunderstood your intention. ;)
But I still think it's best to import all files needed into Flares content directory and if that works (means does not show any broken links) start with reorganization of source files into subfolders of content for two reasons:
1. If you move any file from content to a subfolder of content Flare should* find all references to it and ask whether they are to be updated.
2. Analyzer might help to find broken links.

*should, not will, because my experience with big Flare projects is still rather basic. Perhaps any Flare Professional can provide a better reply.
Kind regards,
Sabine Kamprowski
DocToHelp MVP (by ComponentOne)
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: System variable for path-independent references?

Post by devjoe »

Try to simply the directory structure you are making. Images and Stylesheets do not have to go into separate folders inside Resources, and your topics do not need to be in folders nested three levels deep. Just make one layer of folders under Content, and all image links will look like ../images/filename.png, all stylesheet links will look like ../stylesheets/styles.css, and all topic links will look like ../folder/topic.htm
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: System variable for path-independent references?

Post by chrispitude »

Well, what I'm taking away from this is that "it can't do that." I've written my scripting to make the relative path adjustments, but it would have been nice to have a cleaner solution.

Thanks all!
Post Reply