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?
Footer Proxy for HTML5 output
-
- Propeller Head
- Posts: 54
- Joined: Wed Sep 05, 2018 9:04 am
Re: Footer Proxy for HTML5 output
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.
Or if you want ideas on how to construct the footer, look at Flare's sample templates.
-
- Senior Propellus Maximus
- Posts: 2630
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Footer Proxy for HTML5 output
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"> | <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>
<?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"> | <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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Propeller Head
- Posts: 54
- Joined: Wed Sep 05, 2018 9:04 am
Re: Footer Proxy for HTML5 output
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!
This sounds like a great opportunity to learn. Thanks!
-
- Propeller Head
- Posts: 54
- Joined: Wed Sep 05, 2018 9:04 am
Re: Footer Proxy for HTML5 output
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.
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.
Re: Footer Proxy for HTML5 output
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.
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.
-
- Senior Propellus Maximus
- Posts: 3667
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Footer Proxy for HTML5 output
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:Snippets can hold anything, even whole topics.
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.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)
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
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
- Propeller Head
- Posts: 54
- Joined: Wed Sep 05, 2018 9:04 am
Re: Footer Proxy for HTML5 output
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.
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.
Re: Footer Proxy for HTML5 output
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.
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.
Re: Footer Proxy for HTML5 output
Snippets are amazing and are definitely one of the best features of Flare (in my view).