Difference between revisions of "Issue:The include Parameter and Mulitple Template Invocations"

From FollowTheScore
Jump to: navigation, search
(Reply)
(Reply)
Line 16: Line 16:
  
 
:I'll see what I can do.  I'm still trying to modularize the DPL2 code.  I've started with the transclusion code.  The additions you've made are quite nice.  You mind if the finished product has them available as stand-alone parser functions?  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 00:05, 12 December 2007 (CET)
 
:I'll see what I can do.  I'm still trying to modularize the DPL2 code.  I've started with the transclusion code.  The additions you've made are quite nice.  You mind if the finished product has them available as stand-alone parser functions?  —[[User:Sledged|Sledged]] ([[User talk:Sledged|talk]]) 00:05, 12 December 2007 (CET)
 +
 +
::Not at all. I´d be happy to see the results of mudularizing also in terms of easily accesible functional parts from the user´s perspective. As you may have seen I currently do not make significant changes - mostly error corrections. So there would not be much of a conflict if you made greater changes during the next, say, six weeks. Maybe afterwards we could put the sources into a public svn repository, see the discussion on my discussion page.
 +
 +
::Especially regarding section transclusion: Unfortunately "section", "chapter" and "paragraph" are not being consistently used in the source code and the doc´s. I recommend the following use:
 +
:* A section is a specially labeled portion of wiki text. Sections may be nested and can extend across paragraphs.
 +
:* A paragraph is a piece of text which belongs to a headline. A paragraph extends from its heading to the next heading of same level or to the end of the file; so paragraphs can contain headings and other (smaller) paragraphs.
 +
:* The word "chapter" is used as a generalization for both concepts.
 +
 +
::Regarding the current access to transclusion functionality: the '[[title]]' parameter allows quite a short notation to transclude a chapter, e.g. <nowiki>{{#dpl:title=myDocument|include=mySection}}</nowiki>. The reason is, that "title=" switches off standard output completely. I wonder if a dedicated, separate parser function could offer a shorter syntax.
 +
 +
[[User:Gero|Gero]] 08:48, 12 December 2007 (CET)

Revision as of 08:48, 12 December 2007

Description: Using the include parameter returns all invocations of a specified template
Extension / Version: DPL   /   1.6.0
Type / Status: Bug/Change Request   /   open

Problem

So in continuation of this discussion, I've come across a situation where there are a number of pages that have multiple calls to the same template, and I need to get the first (and only the first) invocation of a template call. Right now DPL2 returns all invocations of a specified template. So what started as a question of curiosity now becomes a request/bug. —Sledged (talk) 22:31, 11 December 2007 (CET)

Reply

In principle it should not be too complicated to do that. But at the moment I am quite busy with other things than DPL; would you like to implement that feature? Gero 23:58, 11 December 2007 (CET)

I'll see what I can do. I'm still trying to modularize the DPL2 code. I've started with the transclusion code. The additions you've made are quite nice. You mind if the finished product has them available as stand-alone parser functions? —Sledged (talk) 00:05, 12 December 2007 (CET)
Not at all. I´d be happy to see the results of mudularizing also in terms of easily accesible functional parts from the user´s perspective. As you may have seen I currently do not make significant changes - mostly error corrections. So there would not be much of a conflict if you made greater changes during the next, say, six weeks. Maybe afterwards we could put the sources into a public svn repository, see the discussion on my discussion page.
Especially regarding section transclusion: Unfortunately "section", "chapter" and "paragraph" are not being consistently used in the source code and the doc´s. I recommend the following use:
  • A section is a specially labeled portion of wiki text. Sections may be nested and can extend across paragraphs.
  • A paragraph is a piece of text which belongs to a headline. A paragraph extends from its heading to the next heading of same level or to the end of the file; so paragraphs can contain headings and other (smaller) paragraphs.
  • The word "chapter" is used as a generalization for both concepts.
Regarding the current access to transclusion functionality: the 'title' parameter allows quite a short notation to transclude a chapter, e.g. {{#dpl:title=myDocument|include=mySection}}. The reason is, that "title=" switches off standard output completely. I wonder if a dedicated, separate parser function could offer a shorter syntax.

Gero 08:48, 12 December 2007 (CET)