Jump to content

User talk:Nigelk/Nav

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 18 years ago by Troll Refaim in topic Up link

This is a long awaited feature in Wikibooks. See Book construct and Wikibooks extension. Another use of the navigational map could be to automatically generate full content page of the book using transclusion; in the same way of b:Ada Programming/All Chapters, but automatically generated from the navigational map. ManuelGR 00:51, 30 December 2005 (UTC)Reply

See also User:LA2#Digitizing_books_with_MediaWiki. Sometimes there is also a need to use different titles at the top of the chapter and in the table of contents, similar to the [[link | linktext ]] syntax for links. --LA2 01:39, 30 December 2005 (UTC)Reply

so from the above two comments and linked pages, i gather some things:

  • that a desired feature is to be able to have a tree of pages for largish documents
  • that being able to address a page and all its ordered children would be nice, separate from just the individual pages themselves
  • that differing links and link text in the toc would be helpful (so, even more like MediaWiki:Sidebar

is someone from wikibooks nearby to comment? User:ManuelGR, how's this compare and contrast with "subpages"?

cheers, --Nigelk 02:05, 30 December 2005 (UTC)Reply

Subpages offer two different features:

  1. Easy linking inside the hierarchy: [[../Sibling page]] gives User talk:Nigelk/Sibling page; [[/Subpage]] gives /Subpage
  2. Automatic link to the parent.

The use of subpages has also helped to use a standard naming convention for books: see b:Wikibooks:Naming policy. The feature #2 is somewhat redundant with the up link provided by your Nav extension. The other features complement nicely with your extension, but as LA2 has said it would be nice to be able to use a different link text for the TOC given that the parent page (e.g. "Ada Programming" in "Ada Programming/Variables") should be hidden in the TOC. This should be implemented INMHO by allowing the use of the full internal link syntax in the navigational map, e.g. [[Ada Programming/Variables|Variables]]. ManuelGR 17:24, 30 December 2005 (UTC)Reply

problem with class syntax[edit]

This may be because you're running this under PHP 5.x and my server is using 4.x, but this line gives an error when I install the Nav.php extension:

private $map = array();

The error:

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /hsphere/local/home/hypertwi/wiki.hypertwins.org/extensions/Nav.php on line 57

I tried changing the line to this:

private $map;

...but the error remained -- which is what makes me think it may be something to do with PHP syntax being different.

Any suggestions? If I was more fluent in PHP or had more time, I could probably figure this out... --Woozle 15:34, 31 December 2005 (UTC)

PHP 4 and PHP 5 compatible for Version 0.5[edit]

Hallo Woozle, and anyone else with this problem. You rightly discover that I was rather cluelessly using php 5. hearing how much this was a desired feature, the 0.5 version of 2006-01-04 runs under both php4 and php5 (or, rather, 4.3.10 and 5.0.4, what I have to hand). Sorry about that! This was a fine use of unit-testing, which see in the article.

cheers, --Nigelk 02:24, 5 January 2006 (UTC)Reply

Exceptions[edit]

Hello, would the use of this extension be compulsory in every single wikibook? I ask this because, though I see it a good idea for conventionally structured wikibooks ([[Title/chapters 1..n]]), but some wikibooks do not share this structure of a book with beginning and end. For example, the cooking book or the b:es:Vocabulario (es) where the user chooses the way he wants to navigate. Thank you, --Javier Carro 21:00, 8 January 2006 (UTC)Reply

Given that the use of the extension would be under request using the <nav> tag, whether all the wikibooks are mandated to have a nav map is under the local policies scope. In my opinion, you are right, some books has not a sequential structure and consequently its use should be optional. But of course, this extension will be very useful for books organized in sequential chapters. The exact use of this extension including naming conventions, have to be discussed in Wikibooks once it is available. ManuelGR 22:16, 8 January 2006 (UTC)Reply


Without being at all involved in wikibooks, i would agree with Manuel that potential authors/administrators/policy-folks should assess it for their needs. i know i have uses for it, but not everyone has the same kind of data. --Nigelk 01:27, 10 January 2006 (UTC)Reply

See User:Nigelk/ConcatPages for a version of Special:ConcatPages that will work with NavMap, and see the [demonstration]. --Nigelk 02:21, 10 January 2006 (UTC)Reply

Up link[edit]

At the demonstration, I try to click the up link at the Twice article but it recive the "Memo To Myself" instead of "Mow the lawn". Troll Refaim 21:37, 1 July 2006 (UTC)Reply