Documentation Title Wrapping

Poster Content
nk4um User
Posts: 92
August 2, 2011 18:02

Hi Peter,

You are correct that it is the title in the menu bar on the left. However since my docs are dynamically created, the title is obtained from reading the document and pulling out the title for the doc. Are you saying that if I put the attribute title in the book section that it will not wrap, but if I just use the title from the Docs that it will wrap?

Take for example - if I go to the Physical Reference Guide NK document, the top level menu item on the left is 'Physical Reference Guide' - not wrapped. But if I go to the Findlaw Data Access documentation, the 'Findlaw Data Access' - is wrapped with each word on a new line in the menu. This also means that the content is pushed to the left side. I will send you a separate email with an image.

Gary

Like · Post Reply
nk4um Moderator
Posts: 901
August 2, 2011 13:23

Hi Gary,

Thanks for sending the visualizer reports - as Tony said in email, this was really timely and will ship as a part of the post-summer updates.

In the meantime I never did get to see your formatting issue - but I think Tony might have hit on it. Do you mean the layout of the titles in the book menu down the left hand side? If you do then you need to know this...

The title that goes on a document is specified in its docs.xml entry...

<doc>
  <id>doc:lang:dpml:guide&lt;/id&gt;
  <title>DPML Language Guide&lt;/title&gt;
  <desc>Guide to Declarative-Request Process Markup Language&lt;/desc&gt;
  <uri>res:/org/netkernel/lang/dpml/doc/dpml-guide.txt&lt;/uri&gt;
  <icon /&gt;
  <keywords /&gt;
&lt;/doc&gt;

You then publish this doc into the book by giving it an entry in the books.xml.

If you don't do anything else then the value of <title> will be used for *both* the main top-level title header, *and* in the menu item for the doc on the left hand side.

However you often want an expressive title on the top but a shorter context title in the menu. So in books.xml you can do this...

<toc>
  <itemid="doc:lang:dpml:title">
    <itemid="doc:lang:dpml:runtime" title="Runtime" /&gt; ...
  &lt;/item&gt;
&lt;/toc&gt;

Notice the @title attribute on the item declaration - this is what goes in the lhs menu.

So with this example (taken from the lang-dpml module), you get "DPML Language Guide" as the main top title in the header and a shorter contextual title in the menu "Guide".

Have I guessed this right?

Cheers,

P.

Like · Post Reply
nk4um Administrator
Posts: 607
August 1, 2011 17:51

Hi Gary, not sure why visualized is blowing up. Please can you send me error page by email? We'll work out why first.

Btw I usually "tune" titles in the doc menu by using the title attribute in books.XML

Cheers Tony

Like · Post Reply
nk4um Moderator
Posts: 901
August 1, 2011 17:48

OK just send me the raw HTML as "Save Page As" in zip.

Incidentally what exception do you get on saving visualizer - never seen that - is it OutOfMemory related?

Thanks

P.

Like · Post Reply
nk4um User
Posts: 92
August 1, 2011 17:33How to send Trace

How should I send the visualizer trace. When I clicked on Save, I got an exception. It is quite a large trace, do you want me to just send you the source.

I am using the standard doc view app.

Gary

Like · Post Reply
nk4um Moderator
Posts: 901
August 1, 2011 17:21CSS

Hi Gary,

I don't think there's anything special. With CSS you use this...

white-space: nowrap;

Not sure which title you mean specifically - or why our titles wouldn't wrap and yours do if your using the same standard doc viewer app?

We maybe need to tidy up the formatting if its on our side. Can you send a visualizer capture so we can look at the details you're seeing.

Cheers,

P.

Like · Post Reply
nk4um User
Posts: 92
August 1, 2011 17:10Documentation Title Wrapping

How do I prevent the title from wrapping in the documentation side menu? The regular NK documenation does not wrap, but my doc titles are wrapping and it just looks untidy.

Like · Post Reply