Query for List of Pages in a Project

24 views
Skip to first unread message

Nader Chmait

unread,
Jan 27, 2017, 3:54:43 PM1/27/17
to SmartAPI
Hi,

I want to be able to get a list of all the pages within a project.  What would be the way to do that?

Thanks,

Nader Chmait

Hilmar Bunjes

unread,
Jan 27, 2017, 5:06:30 PM1/27/17
to smar...@googlegroups.com
Hello Nader,
Project has a property called Pages. Using this you can get the pages of the project. 

Please be aware that pages are language dependent in OTMS. 

Best
Hilmar

Sent via mobile phone
--
More information about SmartAPI: http://www.smartapi.de
---
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "SmartAPI" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an smartapi+u...@googlegroups.com.
Wenn Sie in dieser Gruppe einen Beitrag posten möchten, senden Sie eine E-Mail an smar...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.

Nader Chmait

unread,
Jan 30, 2017, 10:44:01 AM1/30/17
to SmartAPI
Hi,

Thanks for your quick response!  I'm actually still having trouble getting it to work.  Would you mind showing me a code sample of what that would look like?

Thanks!

Nader

Hilmar Bunjes

unread,
Jan 30, 2017, 12:27:26 PM1/30/17
to smar...@googlegroups.com
Hi,
this way you get either the pages in a specific language or in the current language if you have the project:

project.Pages["ENU"]

or

project.Pages.OfCurrentLanguage

You can e.g. iterate over them or search via Linq or misc Get-methods.

Are there any specific problems you have with accessing the pages?

Best,
Hilmar
Reply all
Reply to author
Forward
0 new messages