mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
reworked page acquesition...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
477cb63f43
commit
f56d6c44c0
13
wiki.js
13
wiki.js
@ -92,11 +92,20 @@ var Wiki = {
|
||||
|
||||
// page content...
|
||||
//
|
||||
// NOTE: if this page has not text, this will get the DefaultPage...
|
||||
// XXX should this get the DefaultPage or the EmptyPage???
|
||||
// Test acquesition order:
|
||||
// - explicit path
|
||||
// - .title in path
|
||||
// - .title in templates
|
||||
// - aquire default page (same order as above)
|
||||
//
|
||||
get text(){
|
||||
// get the page directly...
|
||||
return (this.__wiki_data[this.location] || {}).text
|
||||
// acquire the page from path...
|
||||
|| (this.acquire(this.title) || {}).text
|
||||
// acquire the default page...
|
||||
|| (this.acquire(this.__default_page__) || {}).text
|
||||
// nothing found...
|
||||
|| ''
|
||||
},
|
||||
set text(value){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user