Hi All, How do you check whether a page exists? $xwiki.getDocument() returns a valid $doc, even for pages that doesnt exist. Thanks. Duke
Once you have a document there is $doc.isNew() There is also $xwiki.exists("Main.WebHome") Ludovic Duke Tantiprasut wrote:
Hi All,
How do you check whether a page exists? $xwiki.getDocument() returns a valid $doc, even for pages that doesnt exist.
Thanks.
Duke
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
great thanks.
-----Original Message----- From: Ludovic Dubost [mailto:[email protected]] Sent: Thursday, September 01, 2005 11:53 PM To: [email protected] Subject: Re: [xwiki-users] snippet to determine if page exists
Once you have a document there is $doc.isNew() There is also $xwiki.exists("Main.WebHome")
Ludovic
Duke Tantiprasut wrote:
Hi All,
How do you check whether a page exists? $xwiki.getDocument() returns a valid $doc, even for pages that doesnt exist.
Thanks.
Duke
----------------------------------------------------------------------
--
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
participants (2)
-
Duke Tantiprasut -
Ludovic Dubost