Page name is somewhat case insensitive (contrary to my earlier statements). When linking, some pages are considered to be the same (e.g. [Page name] == [PageName], but when accessing programmatically (e.g. through pageExists()) you should consider them to be case sensitive.

/Janne

On 12 Sep 2008, at 20:09, Lannaud, Eric wrote:

Thank a lot. Another question: How-to determine if a page exist?
wiki.pageExists("Foobar") = true
and
wiki.pageExists("foobar") = false

My comprehension is the page's name is case insensitive. It is right?
Then what is the test for know if a page exists?

THX again,
Eric


-----Message d'origine-----
De : Janne Jalkanen [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 12 septembre 2008 15:55
À : [email protected]
Objet : Re: howto get the jspwiki URL of a page


Heya!

Just use

<snip>
WikiEngine wiki = context.getEngine();

// Returns /Wiki.jsp?page=Foobar
String url = wiki.getURL( WikiContext.VIEW, "Foobar", null, false );

// Returns /Edit.jsp?page=Foobar
String url = wiki.getURL( WikiContext.EDIT, "Foobar", null, false );

// Returns http://mywiki.org/Wiki.jsp?page=Foobar
String url = wiki.getURL( WikiContext.VIEW, "Foobar", null, true );
<snip>

Whether you get an absolute or a relative URL in the first two cases
depends on the setting of jspwiki.referenceStyle in your
jspwiki.properties.

/Janne

On 12 Sep 2008, at 09:07, Lannaud, Eric wrote:

Sorry to disturbing you !  I'm  writing a plugin.

When I get :
WikiEngine wikiengine=context.getEngine();
How do I do for print:
/Edit.jsp?page=PageXXXXX
Or
/Wiki.jsp?page=PageXXXXX

The best is to print directly the full HTML like:
<a class="wikipage" href="Wiki.jsp?page=PageXXXXX">PageXXXXX</a>
Or
<a class="createpage" href="Edit.jsp?page=PageXXXXX" title="Create
'PageXXXXX'">PageXXXXX</a>

Thank you for your help   --Eric




Reply via email to