Relative paths in a snippet, include snippet in master page

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Mike Kelley
Propeller Head
Posts: 68
Joined: Fri Aug 22, 2014 12:24 pm

Relative paths in a snippet, include snippet in master page

Post by Mike Kelley »

I've placed a menu (<ul> list) in a snippet and included that snippet in the project master page. I thought Flare would figure out the pathing from the links in the snippet to their targeted topics, but it doesn't. I'm using a TopNav target with this folder structure:
contentStructure.png
This is just a test project - there would be many more folders of themed content at the same level as the Content/MAX folder. My problem is that in the TopNav.flsnp snippet, the links resolve just fine. I can [Ctrl]+Click one of them and the targeted topic opens. On the home page of the top nav output, the menu and links work fine. But on the topic page, the links in the menu no longer work because they're pointing to the wrong place.

Has anyone put a snippet, which contains relative links, into a master page before and gotten the links to resolve on every topic (no matter its location in the source)?
You do not have the required permissions to view the files attached to this post.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Relative paths in a snippet, include snippet in master p

Post by doc_guy »

What is your goal? What is the purpose of the end result?

I think you might find that there is another method to accomplish what you want, for example, maybe you can do what you want with relationship tables instead of a snippet. But it would help to know what you see the end result looking like so we can see if there is a better way.
Paul Pehrson
My Blog

Image
NorthEast
Master Propellus Maximus
Posts: 6375
Joined: Mon Mar 05, 2007 8:33 am

Re: Relative paths in a snippet, include snippet in master p

Post by NorthEast »

You mean that you have a menu proxy (rather than a list) inside the snippet?

I haven't tested that scenario, but I've experienced issues with Flare resolving paths when using the search results proxy on a master page.
I put a search results proxy on a master page, and also had a snippet on the master page that contained link; but those links didn't work in the output, as they were calculated relative to the master page and not the topic.

I spoke to MadCap support, and the only fix was to place the snippet in the same folder as the master page; it's worth a try to see if that works for you.

And of course, submit a bug report.
Mike Kelley
Propeller Head
Posts: 68
Joined: Fri Aug 22, 2014 12:24 pm

Re: Relative paths in a snippet, include snippet in master p

Post by Mike Kelley »

Sorry for being short on details, I had started the post, was interrupted, and then had to leave work with my boss (we carpool) so I just hammered something out. Let me try to be a little more clear:

I'm trying to replace Flare's TopNav with a customized TopNav solution. The intent being that we aren't constrained to the limits of the ToC for the TopNav menu. I created a snippet with an unordered list and the list replicates all the TopNav output markup:

Code: Select all

<nav class="tab-bar" data-mc-ignore="true">
    <section class="middle tab-bar-section row outer-row clearfix">
        <div class="relative clearfix"><a class="logo selected" href="../../Home.htm" alt="Logo" title="Logo"></a>
                <div class="navigation-wrapper">
                        <ul class="navigation clearfix">
                            -- list items here --
In the snippet, the links in the list resolve fine. I can [Ctrl] + Click a link and have the target topic open in Flare. I added the snippet to the OtherTopics and HomePage master pages, just below the opening <body> tag. When I build the output, the menu looks and functions normally, but the links don't resolve. They try to go up two hierarchical levels - which is what you'd expect from a file at the location where the snippet was stored. However, being in the master page, the links should have updated.

If I copy/paste the list into the master pages, the menu and links work fine, but then I have to maintain two sets of links. I was hoping to avoid this with a snippet which I could link to the master pages.
NorthEast
Master Propellus Maximus
Posts: 6375
Joined: Mon Mar 05, 2007 8:33 am

Re: Relative paths in a snippet, include snippet in master p

Post by NorthEast »

Have you tried putting the snippet in the same folder as your master pages?
(If that works, it may be related to the bug I saw.)

Have you tried putting the snippet in a master page, but without including the TopNav markup?
Post Reply