How to create a "page 1 of 1" variable[FIXED]
How to create a "page 1 of 1" variable[FIXED]
Help needed please to create a page variable that will automatically display what page (of ? total pages in document) the User is on
Last edited by M33R4 on Wed Oct 06, 2021 8:09 am, edited 3 times in total.
Newbie to MadCap Flare
-
- Senior Propellus Maximus
- Posts: 2632
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: How to create a "page number" variable
Can you clarify what output you're talking about, please?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: How to create a "page number" variable
Output = PrintChoccieMuffin wrote:Can you clarify what output you're talking about, please?
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.
Newbie to MadCap Flare
-
- Sr. Propeller Head
- Posts: 248
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: How to create a "page 1 of 1" variable
The System.PageCount variable will give you a total page count for the document. I use:
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
Code: Select all
<xhtml:p xhtml:class="footer"><MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" /></xhtml:p>
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
Hi Rob.robdocsmith wrote:..... I use:
in my Footer frame of the page layout....Code: Select all
<xhtml:p xhtml:class="footer"><MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" /></xhtml:p>
cheers,
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.
Newbie to MadCap Flare
-
- Sr. Propeller Head
- Posts: 248
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: How to create a "page 1 of 1" variable
Ahh my apologies.
In your case, your last line should be:
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:
then your footer table would include:
Cheers,
Rob
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>
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;}
Code: Select all
<p class="footer">Page: <MadCap:variable name="System.PageNumber" /> of <MadCap:variable name="System.PageCount" /></p>
Rob