Re: [Wikitech-l] Wiki syntax for representing that a page is a child of another page?

2010-04-13 Thread Helder Geovane
2010/4/11 Aryeh Gregor
simetrical+wikil...@gmail.comsimetrical%2bwikil...@gmail.com



 It might be possible in principle to use some kind of template that
 normally renders as a link, but could be persuaded to render as an
 inclusion under some conditions.  I'm not sure offhand what the best
 way to do this would be.


Maybe something like this?

Template:Chapter:

{{#ifeq:{{SUBPAGENAME}}|Print
  |{{:{{BASEPAGENAME}}/{{{1}
  |[[/{{{1}}}/]]
}}


Table of Contents of the manual, at Manual:

{{Chapter|Title of chapter 1}}
{{Chapter|Title of chapter 2}}
...

which at Manual expands to links:

[[/Title of chapter 1/]]
[[/Title of chapter 2/]]

and at Manual/Print, using

{{:Manual}}

expands to this transclusions:

{{:Manual/Title of chapter 1}}
{{:Manual/Title of chapter 2}}
...


Helder
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Wiki syntax for representing that a page is a child of another page?

2010-04-13 Thread Aryeh Gregor
On Tue, Apr 13, 2010 at 1:27 PM, Helder Geovane heldergeov...@gmail.com wrote:
 Maybe something like this?

 Template:Chapter:
 
 {{#ifeq:{{SUBPAGENAME}}|Print
  |{{:{{BASEPAGENAME}}/{{{1}
  |[[/{{{1}}}/]]
 }}
 

Yeah, that looks like it would probably work.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Wiki syntax for representing that a page is a child of another page?

2010-04-11 Thread Aryeh Gregor
On Fri, Apr 9, 2010 at 11:36 PM, Jack Bates ms...@freezone.co.uk wrote:
 Does there exist a recommended wiki syntax for representing that a page
 is hierarchically a child of another page?

 I don't want to rename the pages

Not in stock MediaWiki.  The typical way to do this is to use subpages:

http://www.mediawiki.org/wiki/Help:Subpages

But you have to rename the pages (and the names can get long/ugly).

 Among the reasons for doing this is that, to build the PDF based on the
 static index, currently I recursively concatenate first the body of a
 page, followed by each of its children

I don't know how it works, but Extension:Collector might be useful to you:

http://www.mediawiki.org/wiki/Extension:Collection

 I thought transclusion was a candidate, because pages are recursively
 transcluded to build the PDF, http://www.mediawiki.org/wiki/Transclusion

 In the wiki however, I don't actually want to display pages embedded in
 each other - instead I want links to child pages. This represents enough
 information about the hierarchical structure to build the PDF

It might be possible in principle to use some kind of template that
normally renders as a link, but could be persuaded to render as an
inclusion under some conditions.  I'm not sure offhand what the best
way to do this would be.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Wiki syntax for representing that a page is a child of another page?

2010-04-10 Thread Helder Geovane
2010/4/10 Jack Bates ms...@freezone.co.uk

 Does there exist a recommended wiki syntax for representing that a page
 is hierarchically a child of another page?

 I don't want to rename the pages

 Currently I use this static, hierarchical index of wiki pages which are
 part of our user manual,
 http://github.com/jablko/manual/raw/master/manual.html

 - to compile the pages into this PDF, http://ica-atom.org/manual.pdf

 Now however, instead of the static index, I want to represent in each
 page's wiki markup, which pages are logically children of that page

 Among the reasons for doing this is that, to build the PDF based on the
 static index, currently I recursively concatenate first the body of a
 page, followed by each of its children

 Now I have a case where, instead of concatenating the children after the
 page body, the children need to be inserted at various positions in the
 page body

 So I think I need to indicate these positions with some wiki syntax, and
 this will make the static index redundant

 I thought transclusion was a candidate, because pages are recursively
 transcluded to build the PDF, http://www.mediawiki.org/wiki/Transclusion

 In the wiki however, I don't actually want to display pages embedded in
 each other - instead I want links to child pages. This represents enough
 information about the hierarchical structure to build the PDF

 My current best candidate is the a href=... rel=down/ link
 relation,

 * http://www.imc.org/atom-syntax/mail-archive/msg21260
 * http://tools.ietf.org/html/draft-divilly-atom-hierarchy-03

 Is there a better syntax for representing, at a particular position in a
 page, that another page is a child?


I seems that this is another instance of the problem mentioned at bug 15073:
https://bugzilla.wikimedia.org/show_bug.cgi?id=15073
What is needed is a set of special pages for handling meta-organization of
books, but this depends on bug 15071 (Wikibooks custom database schema):
https://bugzilla.wikimedia.org/show_bug.cgi?id=15071
 https://bugzilla.wikimedia.org/show_bug.cgi?id=15071for which doesn't
have any progress since 2008-09-16...

Helder
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] Wiki syntax for representing that a page is a child of another page?

2010-04-10 Thread Platonides

You could express those relantionships using semantic mediawiki.



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] Wiki syntax for representing that a page is a child of another page?

2010-04-09 Thread Jack Bates
Does there exist a recommended wiki syntax for representing that a page
is hierarchically a child of another page?

I don't want to rename the pages

Currently I use this static, hierarchical index of wiki pages which are
part of our user manual,
http://github.com/jablko/manual/raw/master/manual.html

- to compile the pages into this PDF, http://ica-atom.org/manual.pdf

Now however, instead of the static index, I want to represent in each
page's wiki markup, which pages are logically children of that page

Among the reasons for doing this is that, to build the PDF based on the
static index, currently I recursively concatenate first the body of a
page, followed by each of its children

Now I have a case where, instead of concatenating the children after the
page body, the children need to be inserted at various positions in the
page body

So I think I need to indicate these positions with some wiki syntax, and
this will make the static index redundant

I thought transclusion was a candidate, because pages are recursively
transcluded to build the PDF, http://www.mediawiki.org/wiki/Transclusion

In the wiki however, I don't actually want to display pages embedded in
each other - instead I want links to child pages. This represents enough
information about the hierarchical structure to build the PDF

My current best candidate is the a href=... rel=down/ link
relation,

* http://www.imc.org/atom-syntax/mail-archive/msg21260
* http://tools.ietf.org/html/draft-divilly-atom-hierarchy-03

Is there a better syntax for representing, at a particular position in a
page, that another page is a child?

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l