Cicode Programming Reference > Cicode Function Categories > Page Functions > PageListInfo

PageListInfo

Gets information of a page at the specific index in the page list of the current window.

Syntax

PageListInfo(INT index,[ INT type])

Index

Index to the page list (valid range 0 to list size minus 1)

Type

Information to return:

0- Page name (default)

1- Configured Page Title

2- Active Page Title

Return Value

String value of the requested information, or empty string if no valid information can be found

Related Functions

PageListCount, PageListCurrent, PageListDelete, PageListDisplay

Example

				
INT count;
INT index;
INT error;
STRING PageName;
				
// While 4 entries will be added to page history, only 3 unique pages will be added to page list
PageDisplay(Page1);
PageDisplay(Page2);			
PageDisplay(Page1);
PageDisplay(Page3);
								
// iterate the pages in the list
count=PageListCount()		//count=3
PageName=PageListInfo(0,0);		//PageName=Page1
PageName=PageListInfo(1,0);		//PageName=Page2
PageName=PageListInfo(2,0);		//PageName=Page3
index=PageListCurrent();		//index=2,as Page3 is currently displayed
pageName=PageListInfo(index,0);	//PageName=Page3
error=PageListDisplay(1);		//recall Page2, error=0
index=PageListCurrent();	//index=1, as current index is moved as part of the recall
PageName=PageInfo(0);		//PageName=Page2 as it becomes the current page
error=PageListDelete(index);	//remove current page, i.e. Page2, error=0
PageName=PageInfo(0);		//PageName=Page3, next page in the list is displayed
index=PageListCurrent();	//index=1, current index is not changed while the list isreduced
count=PageListCount();		//count=2, only 2 pages left in the list

 

See Also

Page Functions

Published June 2018