get folder parent folder?

30 views
Skip to first unread message

gordong

unread,
Jun 28, 2011, 1:30:05 PM6/28/11
to PBworks API
Hi,
I see an API call to get all folders in a workspace - GetFolders -
and I see how to determine whether a page is "in" a folder - GetPages
returns the individual page's parent folder in the pages array - but I
don't see any way to determine whether a given folder is nested in
another folder. GetFolders simply returns an array of folder names,
but no indication whether those folders are nested.

Is there some way to get a folder's parent folder?

thanks for any ideas,
Gordon

Eileen Xie

unread,
Jun 28, 2011, 1:38:30 PM6/28/11
to PBworks API

gordong

unread,
Jun 28, 2011, 2:32:19 PM6/28/11
to PBworks API
Thanks, Elieen! I didn't understand exactly what the verbose
parameter did.

Here's a sample Folder element (in the returned "folders" array)
returned by GetFolders, with verbose turned on:


0 =>
array (
'name' => 'Activity Templates',
'has_custom_perms' => false,
'published' => false,
'count' => 3,
'pagecount' => 3,
'filecount' => 0,
'foldercount' => 0,
'perms' =>
array (
'r' => true,
'w' => true,
'd' => true,
'g' => true,
'a' => true,
),
'parent_id' => 41289127,
'oid' => 41431221,
),


I see a parent ID, and I assume that is associated somehow with a
specific folder, or with the workspace root if this folder has no
parent folder. But how to determine the association with the actual
parent, because each folder's data does not seem to include an ID...

Thanks again for your further assistance!

Eileen Xie

unread,
Jun 28, 2011, 2:44:33 PM6/28/11
to PBworks API
'oid' stands for 'object id'. In your example, Activity Templates
folder has an oid of 41431221. Its parent folder is the one whose oid
is 41289127.

- Eileen

gordong

unread,
Jun 28, 2011, 3:07:51 PM6/28/11
to PBworks API
now that makes sense! Thank you!

Matthew Cornell

unread,
Nov 20, 2015, 12:20:16 PM11/20/15
to PBworks API
New to pbworks, exploring the API, noticing the docs don't include GetPages, even though it exists. Is there up-to-date documentation? Thank you.

Eileen Xie

unread,
Nov 20, 2015, 12:40:55 PM11/20/15
to PBworks API
Hi Matthew,

The GetPages API is not included in the documentation because it is deprecated. Please use GetObjectsNOM instead.

- Eileen

Matthew Cornell

unread,
Nov 20, 2015, 2:24:00 PM11/20/15
to PBworks API

Much obliged! It might be useful for others like me starting out to have the Basics page give a short paragraph on entry points such as this. 2c.
Reply all
Reply to author
Forward
0 new messages