Developer forum

Forum » Development » Get Area first page (frontpage)

Get Area first page (frontpage)

Thomas Larsen
Reply

Hi,

How do i get the page id of the first page (frontpage) on a specific area?

The only thing i have is the area id. I don't have any tags or pageview

BR
Thomas


Replies

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply
This post has been marked as an answer

Hi Thomas,

There is no such information in tags or pageview. The first page is defined by the column PageSort in table Page. Use the API to obtain the information: https://doc.dynamicweb.com/api/html/73c69d20-defa-2aab-9160-4524e90fe97d.htm.

Example:

Dynamicweb.Content.PageService ps = new Dynamicweb.Content.PageService();
var page = ps.GetFirstPageForArea(1);
int id = page.ID;

 

Best regards
Morten Snedker | Helpdesk

 

 

Votes for this answer: 1

 

You must be logged in to post in the forum