Adding a Title to a Side Menu

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
sds
Propeller Head
Posts: 48
Joined: Tue Jun 26, 2018 11:29 am
Location: Tucson

Adding a Title to a Side Menu

Post by sds »

I'd like to add a title to the SideMenu somehow. For example, I would like it to say something like "On This Page", just above the menu content:

On this page
-Section 1 Title
-Section 2 Title
-Section 3 Title

The title should obviously have the same styles as the menu content, so it appears as if it's all one block. I've been digging around the forum threads and some of the text editors in my project and found that I could edit the Master Page by adding a <p> element just above where the menuProxy begins:

Code: Select all

                        <div>
                            <MadCap:topicToolbarProxy />
                            <p>On this Page</p>
                            <MadCap:menuProxy data-mc-skin="/Project/Skins/SideMenu.flskn" mc-linked-toc="/Project/TOCs/Master.fltoc" style="mc-toc-depth: 2;mc-context-sensitive: True;mc-include-parent: True;mc-include-siblings: True;mc-include-children: True;" />
                        </div>
But that means I'm needing to style it right there on the XML. Is there any cleaner way to accomplish something like this, so I'm not hacking a stylized <div> or <p> in the XML of the Master Page? Or hand creating a side menu? Like I said, I'd been searching through some older forums and it seems like Flare used to have a way to add some jQuery to a skin, but, it was later discovered that that particular feature was removed from Flare at some point.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Adding a Title to a Side Menu

Post by NorthEast »

You're following the correct path - you'd need to insert this in the master page, where you've inserted the <p> tag.

You don't have to edit it in text editor mode though - you can open the master page and edit it in either XML Editor (WYSIWYG) or Text Editor views.

To create the "on this page" links, underneath that paragraph you can insert a menu proxy (Insert > Proxy > Insert menu proxy), set it to (Headings), and choose the Levels to show (e.g. 3).
sds
Propeller Head
Posts: 48
Joined: Tue Jun 26, 2018 11:29 am
Location: Tucson

Re: Adding a Title to a Side Menu

Post by sds »

Thanks a lot for the response.

If anyone out there uses the forums as much as I do and you come across this thread, this solution worked rather well. Instead of styling the <p> element inside the Text Editor of my Master Page, I created a new p.style class on my main stylesheet (duh, don't know why I thought I had to use inline styling on the Master Page), and then just assigned the style class to the <p> element on the Master Page, just above the Menu Proxy.

Code: Select all

              
<div>
     <MadCap:topicToolbarProxy />
     <p> </p>
     <p> </p>
     <p class="FLSideMenuHeading-Page">On this Page</p>
     <MadCap:menuProxy data-mc-skin="/Project/Skins/SideMenu-Headers.flskn" mc-linked-toc="$topicHeadings" style="mc-toc-depth: 2;mc-context-sensitive: True;mc-include-parent: True;mc-include-siblings: True;mc-include-children: True;" />
</div>
My Toolbar Proxy got in the way a bit, so I had to insert some blank paragraphs - maybe could've handled that better.

I had to play around a bit with margins and padding on that <p> style class to get it to look and situate correctly over the Menu Proxy, and I'm sure there's room for improvement on it over time, but overall I'm pretty happy with it.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Adding a Title to a Side Menu

Post by ChoccieMuffin »

You could add a bit more padding or margin above that particular style, rather than putting in blank paragraphs.
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
Post Reply