Please enable JavaScript to view this site.

 

Navigation: Tokens > Page Tokens

Template Page Attributes Tokens

Scroll Prev Up Next More

Template Page Attributes tokens determine attributes of the page on which the current token is located.

 

Important: these tokens are calculated taking into account any page deletion which may occur as the result of zap tokens, conditional tokens, or macro tokens, but not taking into account any page deletion which may occur as the result of template saras and/or global saras.

 

The above tokens can be used with zap tokens or conditional tokens to keep or delete some elements depending on the position of the page on which the current token is located.

 

[pGen+]

The number of output pages from the first page generated using the current GridTemplate up to and including the page containing the token.

 

If the same GridTemplate is generated again after pages belonging to another template, the counter does not restart, and the intervening output pages are included. To determine the position within each contiguous occurrence of a GridTemplate, particularly within repeated insertions, use [pIns+].

 

The value of this token on the first page generated for the current template will be 1, regardless of the actual page number within the output file.

[pGen-]

The number of output pages from the page containing the token up to and including the last page generated using the current GridTemplate.

 

If the same GridTemplate is generated again later, after pages belonging to another template, the intervening output pages are included in the count. To determine the position relative to the end of each contiguous occurrence of a GridTemplate, particularly within repeated insertions, use [pIns-].

 

The value of this token on the very last page generated for the current template will be 1, regardless of the actual page number within the output file. The value on the second-to-last page will be 2, etc...

[pSpr+]

The number of output spreads from the first spread generated using the current GridTemplate up to and including the spread containing the token.

 

If the same GridTemplate is generated again after pages belonging to another template, the counter does not restart, and the intervening output spreads are included. To determine the position within each contiguous occurrence of a GridTemplate, particularly within repeated insertions, use [pIns+].

The value of this token on the first spread generated for the current template will be 1, regardless of the actual page number within the output file.

 

Note that spreads are facing pages. Therefore, if a GridTemplate's first page generated is a right page, then this token will have the value 1 only for the first generated page of the template.

[pSpr-]

The number of output spreads from the spread containing the token up to and including the last spread generated using the current GridTemplate.

 

If the same GridTemplate is generated again later, after pages belonging to another template, the intervening output spreads are included in the count. To determine the position relative to the end of each contiguous occurrence of a GridTemplate, particularly within repeated insertions, use [pIns-].

The value of this token on the very last spread generated for the current template will be 1, regardless of the actual page number within the output file. The value on the second-to-last spread will be 2, etc...

 

Note that spreads are facing pages. Therefore, if a GridTemplate's last page generated is a left page, then this token will have the value 1 only for the last generated page of the template.

[pSolo]

Determines if the page, opposite to the page on which the token is located, is from a different template, as can happen if a template's generated pages start on the right or end on the left, or in the case of insertions.

 

The value of this token will be 0 (zero) if the page opposite to the page of the token is of the same template, and will be 1 (one) if the page opposite to the page of the token is from a different template.

[pIns+]

The number of contiguous pages of the current GridTemplate that have been generated before, and including, the page on which the token is.

 

The key word, here, is "contiguous", meaning that this token will only count the number of pages of the same template that have preceded the current page, without any interruption by another template (in which case the count starts again at 1).

 

This token is often used in insertions but can apply to any set of pages related to the same GridTemplate, not only insertions.

[pIns-]

The number of pages of the current GridTemplate that remain to be generated, including the page on which is the token, before the end of the diary is reached, or before a page belonging to another template is reached (in which case, the count stops, regardless of the number of pages of the same template that remain after that interruption).

 

This token is often used in insertions but can apply to any set of pages related to the same GridTemplate, not only insertions.

 

See also: [pSide] page side, [p#] page number.

 


Topic 181680, last updated on 12-Sep-2026