Page 1 of 1

How to create a "page 1 of 1" variable[FIXED]

Posted: Fri Jun 18, 2021 6:28 am
by M33R4
Help needed please to create a page variable that will automatically display what page (of ? total pages in document) the User is on :?:

Re: How to create a "page number" variable

Posted: Sun Jun 20, 2021 4:10 am
by ChoccieMuffin
Can you clarify what output you're talking about, please?

Re: How to create a "page number" variable

Posted: Sun Jun 20, 2021 5:03 am
by M33R4
ChoccieMuffin wrote:Can you clarify what output you're talking about, please?
Output = Print

On my A4 PageLayout, at the bottom of my right and left pages, I have a frame that contains a page number footer within which sits a variable called System.PageNumber

I wish to replace this SystemPageNumber with a page number variable which displays which page of how many total pages the User is currently viewing.

Re: How to create a "page 1 of 1" variable

Posted: Sun Jun 20, 2021 3:55 pm
by robdocsmith
The System.PageCount variable will give you a total page count for the document. I use:

Code: Select all

<xhtml:p xhtml:class="footer"><MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" /></xhtml:p>
in my Footer frame of the page layout.

See https://help.madcapsoftware.com/flare20 ... iables.htm for more info on what system variables are available.

cheers,
Rob

Re: How to create a "page 1 of 1" variable

Posted: Mon Jun 21, 2021 8:38 am
by M33R4
robdocsmith wrote:..... I use:

Code: Select all

<xhtml:p xhtml:class="footer"><MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" /></xhtml:p>
in my Footer frame of the page layout....
cheers,
Rob
Hi Rob.

Where do I insert this code please? I've tried replacing my current code (shown below) with yours but Flare tells me the Document is not valid.

I have my page number in a table row as follows:


<td style="font-size: 10pt;font-family: Calibri;line-height: 12pt;text-align: right;vertical-align: top;padding-left: 0px;padding-right: 0px;padding-top: 0px;padding-bottom: 0px;">
<p style="font-size: 10pt;font-family: Calibri;font-weight: normal;text-align: right;"> </p>
<p style="font-size: 10pt;font-family: Calibri;font-weight: normal;text-align: right;">Page: <MadCap:variable name="System.PageNumber" style="font-size: 10pt;" /> </p>
</td>

Many thanks.

Re: How to create a "page 1 of 1" variable

Posted: Mon Jun 21, 2021 2:51 pm
by robdocsmith
Ahh my apologies.

In your case, your last line should be:

Code: Select all

<p style="font-size: 10pt;font-family: Calibri;font-weight: normal;text-align: right;">Page: <MadCap:variable name="System.PageNumber" style="font-size: 10pt;" /> of <MadCap:variable name="System.PageCount" style="font-size: 10pt;" /></p>
See https://help.madcapsoftware.com/flare20 ... e%20layout for information on page layouts. That's for the latest Flare, but most will apply to older versions if you have one of those.

It would be better to create a footer class in your stysheet that has the charactistics you want instead of local formatting:

Code: Select all

p.footer {font-size: 10pt;font-family: Calibri;font-weight: normal;text-align: right;}
then your footer table would include:

Code: Select all

<p class="footer">Page: <MadCap:variable name="System.PageNumber" /> of <MadCap:variable name="System.PageCount" /></p>
Cheers,

Rob