Difference between revisions of "DPL Example 015"
(New page: Sometimes you want to show content from selected articles but you don´t want to show all of the contents. You may want to suppress images, certain parts of the text or you may want to ign...) |
(No difference)
|
Revision as of 16:55, 10 May 2009
Sometimes you want to show content from selected articles but you don´t want to show all of the contents. You may want to suppress images, certain parts of the text or you may want to ignore the category assignments which may be contsained in the transcluded text.
All this can easily be done with a #replace statement which manipulates the output of a tablerow.
The article on Somalia contsains in its last chapter several items:
- some regular text
- several category links
- several interwiki language links.
If you include the whole chapter via
{{#dpl: |titlematch=Somalia |include=#%-1 |table=,,last chapter }}
You will see all of that content and the articvle which contains the DPL statement will become part of the categories mentioned in the article about Somalia - which is in most cases not what you want:
So you should consider to add a statement like
|tablerow=²{#replace:%%¦/\[\[Category:.*\]\]\s*/¦¦}²
or like
...
to eliminate those portions of the text which you do not want to show.
Using the latter statement you will get the following output: