Difference between revisions of "Test includetrim"

From FollowTheScore
Jump to: navigation, search
Line 19: Line 19:
  
 
<DPL>
 
<DPL>
debug=5
 
 
category            =Random Chapter Content
 
category            =Random Chapter Content
 
mode                =userformat
 
mode                =userformat
Line 40: Line 39:
 
addfirstcategorydate=true
 
addfirstcategorydate=true
 
listseparators      =,,,
 
listseparators      =,,,
secseparators      ={| border="0" style="background:black; color:white" cellspacing="0" border-collapse="collapse" bordercolor="black"¶|- style="background:black; color:white"¶!width="425"|[[%PAGE%|,]],¶!width="300"|,,,¶!width="200"|%DATE%¶|}¶
+
secseparators      ={| border="0" style="background:black; color:white" cellspacing="0" border-collapse="collapse" bordercolor="black"¶|- style="background:black; color:white"¶!width="425"|[[%PAGE%|,]],¶!width="300"|,¶!width="200"|%DATE%¶|- align="center"¶|,,|| Some text here.¶|}¶
 
includetrim        =true
 
includetrim        =true
 
</DPL>
 
</DPL>
Line 48: Line 47:
  
 
<DPL>
 
<DPL>
debug=5
 
 
category            =Random Chapter Content
 
category            =Random Chapter Content
 
mode                =userformat
 
mode                =userformat
Line 55: Line 53:
 
addfirstcategorydate=true
 
addfirstcategorydate=true
 
listseparators      =,,,
 
listseparators      =,,,
secseparators      ={| border="0" style="background:black; color:white" cellspacing="0" border-collapse="collapse" bordercolor="black"¶|- style="background:black; color:white"¶!width="425"|[[%PAGE%|,]],¶!width="300"|,,,¶!width="200"|%DATE%¶|}¶
+
secseparators      ={| border="0" style="background:black; color:white" cellspacing="0" border-collapse="collapse" bordercolor="black"¶|- style="background:black; color:white"¶!width="425"|[[%PAGE%|,]],¶!width="300"|,¶!width="200"|%DATE%¶|- align="center"¶|,,|| Some text here.¶|}¶
 
</DPL>
 
</DPL>

Revision as of 04:36, 7 April 2008

Test includetrim

Or Why is it always good to use includetrim=true when you want to include chapter content with mode=userformat ?


We create pages that contain chapter contents :

Random Chapter Content 1

Random Chapter Content 2

Random Chapter Content 3


Now we want to create tables that will call the chapter content from some sections (chapters) of these pages. Using the mode userformat we want to have full freedom on the output of DPL. When using mode=userformat and including chapter content, it is good to also switch includetrim=true. Here is when includetrim=true is put :


This is a random sentence. 1. This is a chapter. 1. 2008-04-07 04:03:20
This is some content. 1. Some text here.
This is a random sentence. 2. This is a chapter. 2. 2008-04-07 04:04:08
This is some content. 2. Some text here.
This is a random sentence. 3. This is a chapter. 3. 2008-04-07 04:04:50
This is some content. 3. Some text here.


This piece of code has the includetrim=true switch, and it produces this :

This is a random sentence. 1. This is a chapter. 1. 2008-04-07 04:03:20
This is some content. 1. Some text here.
This is a random sentence. 2. This is a chapter. 2. 2008-04-07 04:04:08
This is some content. 2. Some text here.
This is a random sentence. 3. This is a chapter. 3. 2008-04-07 04:04:50
This is some content. 3. Some text here.


Now what would have happened if we did not use includetrim=true ? Here it is :

This is a random sentence. 1.

This is a chapter. 1.

2008-04-07 04:03:20

This is some content. 1.|| Some text here.

This is a random sentence. 2.

This is a chapter. 2.

2008-04-07 04:04:08

This is some content. 2.|| Some text here.

This is a random sentence. 3.

This is a chapter. 3.

2008-04-07 04:04:50

This is some content. 3.|| Some text here.