Difference between revisions of "Issue:Include section always shows all articles in category"

From FollowTheScore
Jump to: navigation, search
(Reply)
(Reply)
Line 37: Line 37:
  
 
: Thanks for the prompt reply and the clarification! The problem with "includematch" is that it only matches against the '''content''' of the section BUT NOT the section's '''heading''', e.g. there might be a section with the heading "Vacation planning" which I would like to be included, but the string "vacation planning" doesn't occur within the text of the section so "includematch" won't include it. I now use a workaround which filters out the empty links using jQuery. --[[User:Nakohdo|nakohdo]] 20:14, 16 February 2011 (CET)
 
: Thanks for the prompt reply and the clarification! The problem with "includematch" is that it only matches against the '''content''' of the section BUT NOT the section's '''heading''', e.g. there might be a section with the heading "Vacation planning" which I would like to be included, but the string "vacation planning" doesn't occur within the text of the section so "includematch" won't include it. I now use a workaround which filters out the empty links using jQuery. --[[User:Nakohdo|nakohdo]] 20:14, 16 February 2011 (CET)
 +
 +
:: If your article contains the desired heading as an "empty chapter" you could use a regexp which matches against non-space characters, i.e. something like [^\s\n] [[User:Gero|Gero]] 08:38, 18 February 2011 (CET)

Revision as of 09:38, 18 February 2011

Description: The output of the include statement isn't restricted to articles which actually contain the required section (chapter).
Extension / Version: DPL   /   1.8.9
Type / Status: Bug   /   open

Problem

I want to create an overview page for a recurring topic by pulling all relevant content from the minutes of meetings like so:

 <dpl>
  category = meeting
  include  = #topic
 </dpl>
 

That does the trick but also lists all the meetings where the topic wasn't on the agenda. Trying to restrict the output by using a filter also doesn't work.

Expected behavior

Using "1" as a limit will only show the link (if the corresponding chapter in the article is not empty), "0" will not show anything, not even the link.
DPL:Manual - DPL parameters: Controlling output volume#include

I've already reported this issue in the forum: DPL: Restrict output when using "include" for sections

--nakohdo 18:11, 16 February 2011 (CET)

Reply

The manual may be not very precise, but it lists the "include" statement under the group "output volume control". This implies that it does NOT and MUST NOT affect the selection process. Specifying a limit restricts the output of other CONTENT but does not suppress mentioning the article's name.

If you only want to see articles where the "topic" chapter is present you must add a suitable includematch condition. You are totally free to design the regexp of "includematch" according to your needs. It will be matched against the whole wiki text of he article.

Gero 19:50, 16 February 2011 (CET)

Thanks for the prompt reply and the clarification! The problem with "includematch" is that it only matches against the content of the section BUT NOT the section's heading, e.g. there might be a section with the heading "Vacation planning" which I would like to be included, but the string "vacation planning" doesn't occur within the text of the section so "includematch" won't include it. I now use a workaround which filters out the empty links using jQuery. --nakohdo 20:14, 16 February 2011 (CET)
If your article contains the desired heading as an "empty chapter" you could use a regexp which matches against non-space characters, i.e. something like [^\s\n] Gero 08:38, 18 February 2011 (CET)