public string GetCaptionOrPageNumber(ref int pageNumber, out string captionI18nId)
{
string outerXml = _getDivNodeForThisPageMethod(this).OuterXml;
//at the moment, I can't remember why this is even needed (it works fine without it), but we might as well honor it in code
if (outerXml.Contains("bloom-startPageNumbering"))
{
pageNumber = 1;
}
if (outerXml.Contains("numberedPage") || outerXml.Contains("countPageButDoNotShowNumber"))
{
pageNumber++;
}
if(outerXml.Contains("numberedPage"))
{
captionI18nId = pageNumber.ToString();
return pageNumber.ToString();
}
if (CaptionI18nId == null)
{
if (string.IsNullOrEmpty(Caption))
captionI18nId = null;
else
captionI18nId = "TemplateBooks.PageLabel." + Caption;
}
else
captionI18nId = CaptionI18nId;
return Caption;
}