Index: session.scm ================================================================== --- session.scm +++ session.scm @@ -74,12 +74,12 @@ (slot-set! self 'sroot "./") (slot-set! self 'session-cookie #f) (slot-set! self 'curr-err #f) (slot-set! self 'log-port (current-error-port)) (slot-set! self 'seen-pages '()) - (slot-set! self 'page-dir-style 'oldstyle) ;; onedir: pages/_(view|control).scm - ;; anything else: pages//(view|control).scm + (slot-set! self 'page-dir-style #t) ;; #t : pages/_(view|control).scm + ;; #f : pages//(view|control).scm (slot-set! self 'debugmode #f) (for-each (lambda (slot-name) (slot-set! self slot-name (make-hash-table))) (list 'pagevars 'sessionvars 'globalvars 'pagevars-before 'sessionvars-before 'globalvars-before)) @@ -498,11 +498,13 @@ ;; May 2011, putting all pages into one directory for the following reasons: ;; 1. want filename to reflect page name (emacs limitation) ;; 2. that's it! no other reason. could make it configurable ... (define-method (session:call-parts (self ) page parts) (slot-set! self 'curr-page page) - (let* ((dir-style (eq? (slot-ref self 'page-dir-style) 'onedir)) ;; flag #t for onedir, #f for old style + (session:log self "page-dir-style: " (slot-ref self 'page-dir-style)) + (let* ((dir-style ;; (equal? (slot-ref self 'page-dir-style) "onedir")) ;; flag #t for onedir, #f for old style + (slot-ref self 'page-dir-style)) (dir (string-append (slot-ref self 'sroot) (if dir-style (conc "/pages/") (conc "/pages/" page)))) (control (string-append dir (if dir-style @@ -514,11 +516,12 @@ (load-view (and (file-exists? view) (or (eq? parts 'both)(eq? parts 'view)))) (load-control (and (file-exists? control) (or (eq? parts 'both)(eq? parts 'control)))) (view-dat '())) - ;; (sugar "/home/matt/kiatoa/stml/sugar.scm" )) + (session:log self "dir-style: " dir-style) + ;; (sugar "/home/matt/kiatoa/stml/sugar.scm" )) ;; (print "dir=" dir " control=" control " view=" view " load-view=" load-view " load=control=" load-control) (if load-control (begin (load control) (session:set-called! self page)))