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...
|
// page content...
|
||||||
//
|
//
|
||||||
// NOTE: if this page has not text, this will get the DefaultPage...
|
// Test acquesition order:
|
||||||
// XXX should this get the DefaultPage or the EmptyPage???
|
// - explicit path
|
||||||
|
// - .title in path
|
||||||
|
// - .title in templates
|
||||||
|
// - aquire default page (same order as above)
|
||||||
|
//
|
||||||
get text(){
|
get text(){
|
||||||
|
// get the page directly...
|
||||||
return (this.__wiki_data[this.location] || {}).text
|
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
|
|| (this.acquire(this.__default_page__) || {}).text
|
||||||
|
// nothing found...
|
||||||
|| ''
|
|| ''
|
||||||
},
|
},
|
||||||
set text(value){
|
set text(value){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user