[SOLVED] Mini-Tocs Pulling Entry Descriptions

This forum is for all Flare issues related to styles, stylesheets and XML.
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

[SOLVED] Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

For ease of use, and a quick guide, this is the solution to the issue I was having:

Edit the MadCap|miniTocProxy to display the heading levels I needed.

Edit the p.MiniTOC# that I didnt want a leader (those dots) for by setting the mc-leader-format property to: none

Then I needed to remove the page numbers which was causing major issues unil Ryan posted the hack below, I want to empahsize (because he did) that this isn't supported and real ugly :D


To remove page numbers from the miniTOC output I needed to do the following:

This was posted by Ryan Cerniglia
I've found a way to disable the page numbers for the second level of the TOC. To disable the page numbers for any other level, change the "2" below to the desired level.

WARNING: Unsupported, Ugly Hack!

Open your stylesheet
Add a class to the TD element named "GenMiniTOCPageText2"
Set the property "display" of the element to "none"
Regenerate PDF


Thanks to Paul, Lisa, and Ryan for helping me figure this out, hopefully it helps other people. If i missed any steps in the recap please let me know.
---------------------------------
Archive Material

So, I am thinking about using mini-tocs to control the "what is in this chapter" pages throughout my manual. BUT we are in the process of implementing a new template for our procedure segue pages that includes a short description of the procedure on the page, so something like this:

<link to procedure>
short desc

<link to procedure>
short desc

now, i could just create a variable or snippet for each short description but, that would create a HUGE list of snippets or variable sets (i was thinking 1 variable set per chapter or section of a chapter to control the short description). after tooling around with some mini-tocs on the field and button descriptions links (these dont have short descriptions) my document looked kind of funny having a mini-toc for F&B segue pages and a list of links/short descriptions on the procedure segue pages.

basically i want the new mini-toc style to create something like this:

<link to procedure>
<pulled short description from linked procedure>

i was thinking that i would have to create some line of code (probably java, which i am still at a basic understanding of) to pull the short description from the linked item.

if anyone has any ideas that would be SUPER awesome.

thanks
-dm
Last edited by DurtyMat on Fri Apr 03, 2009 12:40 pm, edited 1 time in total.
Flare: I bought it ... so that means I can break it, right?
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

bumping for some forum love.
Flare: I bought it ... so that means I can break it, right?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

I'm not sure what variables would give you? is this a specific piece of content that you want to reuse in multiple places? It sounds like you just want a summary of a feature that is described in the chapter.

As I'm thinking about this, I think you can use the MINI-TOC to get what you want, and you won't even have to do much jimmying to get it to work. The Mini-TOC pulls it's hirearchy of content, not based on the actual heading levels, but on the mc-heading-level property that is associated with a piece of content.

So you could add a class of H2 that is H2.description. If your H2 had a mc-heading-level of 2, then your H2.description class would have mc-heading-level 3.

Then consider the following topic structure:

Code: Select all

<H1>This is my topics</H1>

<p>Blah blah blah</p>

<h2>Feature name</h2>
<p class="strong">Overview of feature</p>
<h2 class="description">Feature description that you want to appear in the mini-toc.</h2>
<p class="strong">Details</p>
<p> All the rest of the content that you DON'T want to appear in the mini-toc</p>

<h2>Another Feature name</h2>
<p class="strong">Overview of feature</p>
<h2 class="description">Feature description that you want to appear in the mini-toc.</h2>
<p class="strong">Details</p>
<p> All the rest of the content that you DON'T want to appear in the mini-toc</p>
Now when you create your MINI-toc, make sure you take it to level 3 depth, so you get the Feature name AND the description. You can use the mini-toc styles in the style sheet to modify how these appear in relation to each other.

The only think I think you may have trouble with is that when you create your book TOC for printed output, you'll need to make sure you only go down to level 2, or else you will also see the descriptions in your printed table of contents, which isn't what you want.

Does that make sense? I've never tried it, but theoretically, it should work.

If you wanted to make it so that the h2.description text wasn't included in the topic itself, I suppose you would apply the display:none attribute to that entry in the style sheet, but if you do that, you might want to add it to a separate style sheet that is called by the master page so that you can see the text while you're editing, but when the project is actually built, the display:none style will be applied.
Paul Pehrson
My Blog

Image
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

Thanks Paul!

I think that might work, I am going to have to switch it from a h3 to a h6 as our main toc uses heading levels 1-5 when going out to print. I don't mind the short descriptions going out to print because our users are still very reliant on our user manuals, /sigh.

I am going to do some testing and let you know how it works out. Thanks again for the help.

-dm

EDIT: initial test, everything works out the way i want it to, except, i dont want the page numbers for the heading 6, any suggestions, see image for info.
minitoc_example.png
You do not have the required permissions to view the files attached to this post.
Flare: I bought it ... so that means I can break it, right?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

Right. Dang

That won't happen in online output, but I'm going to have to think about that in printed output. I'm not sure how you can change that...
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

OK. I have no idea if this will work, but check out this setting in the style sheet:

Image

What if for the second level (whatever level corresponds to your H6, or whatever), you change the options on this tab to "leader:none; page-number-width: 0px;"

What happens then?

My hope is that the leader will go away, and if the page number width is 0px, then no page number can be displayed. Try it. Doesn't hurt to try, right?
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

And while you're at it, submit a feature request to MadCap to add an addition option to that tab, where you can set "page-number:none;"
Paul Pehrson
My Blog

Image
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

incoming test. more @ 11...not really 11, but it sounded cool.

[EDIT]

So, after testing it, it looks like the changes I am making aren't being applied to the MadCap|MiniTOCProxy. I am changing the p.MiniTOC6 within the stylesheet and when i build it none of the changes I have made are being displayed.

its like the miniToc isn't using the p.MiniTOC for the style because none of the changes I make to this style are reflected in the builds. :-.
Flare: I bought it ... so that means I can break it, right?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

K. This is annoying, but open a built topic in the browser, then view the source. There are usually (at least) two style sheet links. One is to the style sheet you use in your project. Another is to madcap.css.

Which comes LAST?

And if it is madcap.css, then go open MadCap.css (the compiled version in the build folder), and see if that style sheet is overriding your settings.
Paul Pehrson
My Blog

Image
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

will do, i am currently working on some floating text boxes that will house a link to our KB using keywords from the heading (expect questions on this :D) to create a link to the search results, the option to post the results in a bulleted list is being looked into, it really depends on how much wrist violin practice i want to get into :D

thanks for the help, i will be testing it within the hour. again, thanks for the help.

-dm
Flare: I bought it ... so that means I can break it, right?
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

wait, im going to pdf so i cant access the css, rather i dont use a css is in the output ...
Flare: I bought it ... so that means I can break it, right?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mini-Tocs Pulling Entry Descriptions

Post by LTinker68 »

You can create a test target for WebHelp output in that project and generate it. Then open one of the compiled htm files in Notepad and see how the stylesheets are referenced. I'm with Paul -- I have a feeling MadCap.css will be listed last.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

<script src="../SkinSupport/skin.js">/*<![CDATA[*/ /*]]>*/</script>
<link href="../SkinSupport/MadCap.css" rel="stylesheet" />
<link href="../Resources/Stylesheets/techcomm_css_lite.css" rel="stylesheet" />

code from the webhelp output. :-/
Flare: I bought it ... so that means I can break it, right?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mini-Tocs Pulling Entry Descriptions

Post by LTinker68 »

Interesting. Your stylesheet was listed last, and assuming the print output applies stylesheets in the same order, then your stylesheet should have precedence. When you made the last changes to the mini-TOC styles, did you verify that you were in the print medium? Sometimes the Stylesheet Editor switches mediums on you with no warning. You might also want to open the stylesheet file in the Internal Text Editor to make sure there aren't conflicting styles declared.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

even if i create a new project and edit the default css, the changes i make to p.mintoc6 don't get applied to the heading 6 in the minitoc :-/
Flare: I bought it ... so that means I can break it, right?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

Check with what Lisa mentioned before about the medium. You need to be sure these changes are applied in the PRINT section of the style sheet, not the default section.
Paul Pehrson
My Blog

Image
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

yea i am in the print medium.

css code:

Code: Select all

/*<meta />*/

body
{
	font-family: Arial;
}

h1
{
	font-weight: bold;
	font-size: 24.0pt;
}

h2
{
	font-weight: bold;
	font-size: 18.0pt;
}

h3
{
	font-weight: bold;
	font-size: 14.0pt;
}

h4
{
	font-weight: bold;
	font-size: 12.0pt;
}

h5
{
	font-weight: bold;
	font-size: 10.0pt;
}

h6
{
	font-weight: bold;
	font-size: 8.0pt;
}

p
{
	font-size: 12.0pt;
	margin-top: 0pt;
	margin-bottom: 0pt;
}

ol,
ul
{
	margin-top: 0px;
	margin-bottom: 0px;
}

img
{
	border: none;
}

a.Popup
{
	
}

MadCap|expandingHead
{
	font-style: italic;
	font-weight: normal;
	cursor: hand;
	text-decoration: none;
	color: #006600;
}

MadCap|expandingBody
{
	color: #777777;
	font-style: italic;
}

MadCap|dropDownHotspot
{
	cursor: hand;
	font-style: italic;
	text-decoration: none;
	color: #006600;
}

div.floatingkb
{
	border-left-style: dashed;
	border-left-width: 2px;
	border-left-color: #008b8b;
	border-right-style: dashed;
	border-right-width: 2px;
	border-right-color: #008b8b;
	border-top-style: dashed;
	border-top-width: 2px;
	border-top-color: #008b8b;
	border-bottom-style: dashed;
	border-bottom-width: 2px;
	border-bottom-color: #008b8b;
	background-color: #90ee90;
	width: 140px;
	float: right;
	clear: right;
}

p.MiniTOC6
{
	mc-leader-format: 'none';
	mc-leader-offset: 0;
}

@media print
{
	p.MiniTOC6
	{
		mc-leader-format: 'none';
		mc-leader-offset: 0px;
	}

	p.TOC6
	{
		mc-leader-format: 'none';
		mc-leader-offset: 0px;
	}
}

Flare: I bought it ... so that means I can break it, right?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mini-Tocs Pulling Entry Descriptions

Post by LTinker68 »

Sorry if you already mentioned this, but are you building Word or PDF output?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

going straight to pdf :D

and i dont think i ever mentioned it.
Flare: I bought it ... so that means I can break it, right?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mini-Tocs Pulling Entry Descriptions

Post by LTinker68 »

Wait a minute. Why are you modifying p.MiniTOC6? If you're going down two levels in the miniTOC, then you should only be modifying p.MiniTOC1 and p.MiniTOC2. The paragraph style you modify doesn't match the heading level of the content being pulled -- it matches the depth of that content in the miniTOC.

p.MiniTOC6 was just an example that Paul used.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

that makes sense :D.

i will test is and post results. :D
Flare: I bought it ... so that means I can break it, right?
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

well, the minitoc is assigning the heading 6 as minitoc level 5, which would explain no changes being made when i modified the minitoc6 BUT the numbers still show up. so paul's idea won't work, although i appreciate his help. :D
Flare: I bought it ... so that means I can break it, right?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Mini-Tocs Pulling Entry Descriptions

Post by doc_guy »

Did you modify the width attribute I showed you on that screen shot? Your style sheet didn't reflect a width setting there.
Paul Pehrson
My Blog

Image
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mini-Tocs Pulling Entry Descriptions

Post by LTinker68 »

Another option and something I had to resort to on another project is to use cross-references instead of the miniTOC. In my case, it was because I was using one page layout for the "section" book (e.g., Part One, Part Two, etc.), and a different page layout for the "chapters" in that section. I was using different colored bars along the side of the pages to differentiate between a "section" and a "chapter" so I had to use different page layouts. Unfortunately, even though the "chapters" were part of "section" book, the miniTOC proxy wasn't able to handle the change between the page layout. At least, that's what I concluded.

So a solution might be to create two new xref classes, stylize them the way you want, then create a topic and manually insert cross-references to the relevant "chapter" titles inside that "section" book. It's a bit of a pain because you have to set it up manually. And I also discovered a bug with cross-references -- if the topic it's cross-referenced to is excluded from the output, the xref remains in place. That was in v4.0 -- v4.2 might have options to remove the entire xref, but I haven't worked on that project since 4.2 came out, so for now, I applied a condition tag to the specific xref that isn't to be included in the output.

Anyway, you might try that. I didn't have page numbers in my fake miniTOC, but you could try the mc-leader attributes that Paul pointed out.

Make sure you submit a bug report about the problem with modifying the miniTOC style.

EDIT: But answer Paul's question first (we posted at about the same time).
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
DurtyMat
Sr. Propeller Head
Posts: 224
Joined: Wed Aug 22, 2007 8:09 am
Location: ClrH2o, Fl

Re: Mini-Tocs Pulling Entry Descriptions

Post by DurtyMat »

doc_guy wrote:Did you modify the width attribute I showed you on that screen shot? Your style sheet didn't reflect a width setting there.
i see the mc-leader-offset but i dont see the width thing you were talking about. can you point me in the right direction? :mrgreen:
Flare: I bought it ... so that means I can break it, right?
Post Reply