Issue:Double inclusion of author and editdate

From FollowTheScore
Jump to: navigation, search
Description: How to include editdate for a page and then including that page and retaining info
Extension / Version: DPL   /   1.8.8
Type / Status: Change Request <-- please select   /   open

Problem

I've got a template that holds the following query:


 <includeonly>
 {{#dpl:
 |title={{FULLPAGENAME}}
 |skipthispage=no
 |addauthor=true
 |adduser=true
 |ordermethod=firstedit
 |addeditdate=true
 |format=,[[User:%USER%|%USER%]] - %DATE%,,
 }}
 </includeonly>

The template is used in a number of pages that I also gather in one larger page. The trouble is, that the above DPL-query then applies to the large page that includes the other smaller ones. Obviously because of the {{FULLPAGENAME}}-magic word, but {{Subst:FULLPAGENAME}} won't work because of the parser order.

It's obvious that I'm just taking the long way around in terms of including a signature stamp. I'm fully aware that it can be done by making a template like ~~<noincludes>~~, but it never makes it to the page that it needs to unless I substitute the template that holds the above query. And that's no good, since that template takes a number of parameters that I display on my large page.

A complicated explanation, I apologize.. I'm sure I'm missing something basic here.

Any help?

Reply

As far as I know there exists NO way for an included document (or template) to find out its own name. FULLPAGENAME will always relate to the topmost document.

I have had the same problem several times and I always solved it by calling the template with the name of the document as a hardcoded argument. This can be made somewhat more comfortable if you use subst:FULLPAGENAME in an edit template. Still, after the document has been saved for the first time there will appear the document´s literal name in the call to the edit-stamp template.

In principle this works fine; but when you rename a page you must change this literal as well.

Gero 07:27, 14 September 2009 (UTC)

Reply

Ok, this all had very little to do with DPL, I suppose. Sorry to take your time. I reached the same conclusion as you, thanks for the reply. --Martinfs 20:33, 15 September 2009 (UTC)