View Full Version : Page Name and Page ID
When I specify a pageid using ={pagename} as follows:
@api/deki/pages/=Poppy_Page/files
it seems I can only specify a first level page. Is that right? Or can I specify a subpage somehow too? I can always use the pageid value, but it would be handy to specify subpages.
I was just doing something wrong. Ignore my previous post. I can specify a page using ={pagename} even when it is a subpage.
SteveB
08-07-2007, 02:30 PM
I'm sure this is a question that's going to come up a lot, so I'm going to post the answer even though you already figured it out. :)
When using the ={pagename} notation, {pagename} is the complete page path. In order to not trip up the URI, the page path needs to be encoded. Unfortunately, in order not to trip up Apache, the encoded page path needs to be encoded again (urgh).
So, in other words, if your page path is: My_Project/Deliverables
And you encode it once, you get: My_Project%2fDeliverables
And then, you'll need to encode it again: My_Project%252fDeliverables
In javascript, that would look something like this:
var page_api_uri = 'http://myserver/@api/deki/pages/=' + encodeUri(encodeUri(page_path));
Hope this will help some from losing their sanity. ;)
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.