Footer Proxy for HTML5 output

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

Footer Proxy for HTML5 output

Postby ArdisRamey on Wed Nov 07, 2018 12:50 pm

I've been handed styling and content requirements for a footer to be added to each page of our HTML5 doc output. While I have the style successfully in our stylesheet, I'm flummoxed as to how to write the footer content once and insert it into all pages. (Obviously I want to avoid a solution that has me re-typing all the footer content into each topic.)

My first assumption had been to use a Footer Proxy inserted in each of my Master Pages, but the only Footer Proxy in Flare is specifically (and solely) designed for use in print output.

I'm sure there's a standard way to accomplish this, but can't find any documented solutions to this problem (in searching both the web and Flare's Help documentation).

Can anyone help?
ArdisRamey
Propeller Head
 
Posts: 42
Joined: Wed Sep 05, 2018 9:04 am

Re: Footer Proxy for HTML5 output

Postby Dave Lee on Thu Nov 08, 2018 12:29 am

I create a footer in a snippet, and then insert that snippet into all my master pages below the topic body proxy.

Or if you want ideas on how to construct the footer, look at Flare's sample templates.
Dave Lee
Master Propellus Maximus
 
Posts: 5368
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Footer Proxy for HTML5 output

Postby ChoccieMuffin on Thu Nov 08, 2018 6:26 am

This is the code for my HTML5 masterpage, and it works nicely. (The only reason my footer div has an id is that I do something whizzy with it elsewhere.)

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
<head>
</head>
<div id="skin-heading">
<p class="Title-bar">&#160;&#160;|&#160;&#160;<MadCap:variable name="Local_Data.ApplicationName" /></p>
</div>
<script type="text/javascript">/*<![CDATA[*/
$(document).ready(function(){
$("#skin-heading").appendTo("div.logo-wrapper");
});
/*]]>*/</script>
<body>
<MadCap:topicToolbarProxy data-mc-skin="/Project/Skins/HTML5_Topic_Toolbar.flskn" />
<MadCap:breadcrumbsProxy />
<div>
<MadCap:bodyProxy />
</div>
<div id="footer">
<MadCap:snippetBlock src="../Snippets/Footer_table.flsnp" />
</div>
</body>
</html>
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1832
Joined: Wed Apr 14, 2010 8:01 am

Re: Footer Proxy for HTML5 output

Postby ArdisRamey on Thu Nov 08, 2018 8:57 am

I've never used snippets! (And really still don't understand what they're intended to do.)

This sounds like a great opportunity to learn. Thanks!
ArdisRamey
Propeller Head
 
Posts: 42
Joined: Wed Sep 05, 2018 9:04 am

Re: Footer Proxy for HTML5 output

Postby ArdisRamey on Thu Nov 08, 2018 12:53 pm

Ok, after looking into this, I do not see how a snippet will solve my footer problem. Snippets appear to only hold text, while the footer is a complex arrangement of text and formatting.

Can anyone help me see the light?

Attachment contains a mockup of the kind of thing I'm looking to do in a footer.
You do not have the required permissions to view the files attached to this post.
ArdisRamey
Propeller Head
 
Posts: 42
Joined: Wed Sep 05, 2018 9:04 am

Re: Footer Proxy for HTML5 output

Postby Psider on Thu Nov 08, 2018 4:58 pm

Snippets can hold anything, even whole topics.

But! You can insert them either as SnippetText (like a span) or SnippetBlock (like a div). So if you inserted a snippet and it didn't appear how you expected, check that you inserted it as a snippetblock (I can't remember how you switch between, but if your cursor is in a blank paragraph, I think it should default to snippetblock. I'm sure someone else will jump in and confirm)

Also, don't confuse them with Variables, which are designed for short pieces of text, like company name, that might change per client.
Psider
Sr. Propeller Head
 
Posts: 466
Joined: Wed Jul 06, 2011 1:32 am

Re: Footer Proxy for HTML5 output

Postby Nita Beck on Fri Nov 09, 2018 12:13 am

Psider wrote:Snippets can hold anything, even whole topics.

I think that's a little misleading and may confuse some users. I'd think of it instead as this: A snippet can hold anything that a topic can hold.

Psider wrote:But! You can insert them either as SnippetText (like a span) or SnippetBlock (like a div). So if you inserted a snippet and it didn't appear how you expected, check that you inserted it as a snippetblock (I can't remember how you switch between, but if your cursor is in a blank paragraph, I think it should default to snippetblock. I'm sure someone else will jump in and confirm)

Your description of the difference is a good one. Let me add: When a snippet that is inserted into a block that already has something else in it, say a paragraph, the snippet will be treated as "snippet text" (and if you look in the code, you'll see "snippetText". A snippet inserted this way loses all of its internal formatting and instead assumes the formatting of the block that it's been inserted into. By contrast, if a snippet is inserted into a completely empty block (for example, an empty p, an empty td), the snippet will retain its internal formatting. In the code, you’ll see “snippetBlock”. And you’ll even see a snipper block structure bar in the XML Editor.

I make pretty heavy use of snippets. For example, if I need to show a link to a website, I put that link in a snippet so that I can drop it into topics wherever I need it. That way, I have just one instance of that link to maintain. (And yes, this is different than using a variable in that a variable is "flat"; it can't have link code behind it.) Likewise, if I need to show a link to an email address (e.g., the email address for customer support), I put that in a snippet so I have just once instance of it to maintain.

I also use snippets to hold "placeholder" content. Say that I know I"ll be adding a lot of tables formatted a certain way and always having the same three columns with the same column headings. I'll set up a snippet with the table already set up, with placeholder content. I'll insert that snippet as a snippet block (as I want to keep that the internal formatting) and then immediately convert it to text (by right-clicking on its structure bar and selecting Convert to Live Text [I think; I'm going on memory]), and then I can continue populating the snippet.

Finally, I also use snippets for the headers and footers in the page layouts that I use for PDF output. This way, I have just one instance of each (or maybe two instances of each, if I'm using left and right pages). Plus (and I'm really going off on a tangent here), because snippets are edited in the XML Editor, I can look at the underlying code of the snippet, whereas one can't easily look at the code of the header frame or footer frame of a page layout.

Ardis, you will LOVE snippets once you start using them.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3038
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Footer Proxy for HTML5 output

Postby ArdisRamey on Fri Nov 09, 2018 8:32 am

Nita, you do make snippets sound very flexible and powerful. I've been wondering what their intent/use was since my first day with Flare - but the provided doc didn't explain it in a way that I understood.

I see how snippets could provide for PDF/print footers, but I still have some reservations about how that'll work out in a responsive/HTML5 application. I'll give it a try and let y'all know what I've learned.
ArdisRamey
Propeller Head
 
Posts: 42
Joined: Wed Sep 05, 2018 9:04 am

Re: Footer Proxy for HTML5 output

Postby Dave Lee on Mon Nov 12, 2018 12:33 am

Why do you have reservations?

A snippet is just a reusable block of content. Anywhere you might copy and paste the same content, you could use a snippet.
(It's also more powerful, because you can have different variations of that content by using snippet conditions and variables.)

I suggested putting your HTML5 footer inside a snippet because presumably you want to include the same footer on all your master pages.
Dave Lee
Master Propellus Maximus
 
Posts: 5368
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Footer Proxy for HTML5 output

Postby AlexFox on Mon Nov 12, 2018 3:39 am

Snippets are amazing and are definitely one of the best features of Flare (in my view).
AlexFox
Sr. Propeller Head
 
Posts: 117
Joined: Thu Oct 19, 2017 1:56 am


Return to Web-based Outputs

Who is online

Users browsing this forum: jeff_gleeson and 8 guests