Hi.
Forgive me if this is covered elsewhere, but i couldnt find a reference for
the particulars of what I need.
I have a set of HTML files, and they have a common primary navigation. I
built a rudimentary applescript file to use as the persistent includes file,
which generates the navigation each time. There are 5 nav elements, and each
nav element is a link to another file at the website ROOT.
To the script, I pass 5 variables from each originating file that are
strings to name the CSS of each element, to idstinguish the "current"
element from the other elements. A shortened version is the following:
<!-- #bbinclude ":includes:manager_secondaryNav.scpt"
#N1#="current"
#N2#="normal"
-->
The real problem is that I have multiple directory levels, and I need to
rearrange file location on occasion, and I want to use the same script to
generate the correct links. In a standard bbedit includes file, I would do
the following:
<a href="#RELATIVE#pages/home_initial.html">Overview</a>
But, how can I use the #RELATIVE# placeholder within the applescript? One
first glance answer would be to list it in the include variables, like this:
<!-- #bbinclude ":includes:manager_secondaryNav.scpt"
#N1#="current"
#N2#="normal"
#REL#="#RELATIVE#"
-->
Where the script would then generate links using REL from the vars list. But
then, of course, the first refresh collapses the placeholder, and it doesnt
work more than once.
Is there an elegant, programmatic way to do this? If there is a solution in
python or such, I'm open to switching to that.
Thanks in advance.
Michel Milano