Differences From Artifact [56cd7b3d4f]:

To Artifact [a12cd32804]:


14
15
16
17
18
19
20

21
22
23
24
25
26
27
The URL:

http://the.domain.com/pagename/p1/p2/p3?param1=value1

(s:get-page-params) => '("p1" "p2")

(s:get-param 'param1) => "value1"


Create a link.
~~~~~~~~~~~~~~

(s:null "[" (s:a name 'href 
               (s:link-to (string-append "location/" (string-intersperse p "/") ""))) "] ")))








>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The URL:

http://the.domain.com/pagename/p1/p2/p3?param1=value1

(s:get-page-params) => '("p1" "p2")

(s:get-param 'param1) => "value1"
(s:get-param 'param1 'number) => number or #f 

Create a link.
~~~~~~~~~~~~~~

(s:null "[" (s:a name 'href 
               (s:link-to (string-append "location/" (string-intersperse p "/") ""))) "] ")))

66
67
68
69
70
71
72

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92

93
94
95
96
97
98
99
;; use (s:get-param to get the 'id, or 'reply_to values


Get and set a session var
~~~~~~~~~~~~~~~~~~~~~~~~~

(s:session-var-get "keyname")

(s:session-var-set! "keyname" "value")

5.1 Page local vars

(s:set! key val)
(s:get key)


make a selection drop down
~~~~~~~~~~~~~~~~~~~~~~~~~~

In view.scm: 

(s:select '(("World" 0)("Country" 1)("State" 2)("Town/City" 3)) 'name 'scope)

In control.scm:

(let ((scope (s:get-input 'scope)))

  ....



Simple error reporting
~~~~~~~~~~~~~~~~~~~~~~

In control.scm:
(s:set-err "You must provide an email address")








>













|



|
>


>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
;; use (s:get-param to get the 'id, or 'reply_to values


Get and set a session var
~~~~~~~~~~~~~~~~~~~~~~~~~

(s:session-var-get "keyname")
(s:session-var-get "keyname" 'number) 
(s:session-var-set! "keyname" "value")

5.1 Page local vars

(s:set! key val)
(s:get key)


make a selection drop down
~~~~~~~~~~~~~~~~~~~~~~~~~~

In view.scm: 

(s:select '(("World" 0)("Country" 1)("State" 2 #t)("Town/City" 3)) 'name 'scope)

In control.scm:

(let ((scope     (s:get-input 'scope))
      (scope-num (s:get-input 'scope 'number))) ;; 'number, 'raw or 'escaped
  ....

The optional third entry sets that item as selected if true

Simple error reporting
~~~~~~~~~~~~~~~~~~~~~~

In control.scm:
(s:set-err "You must provide an email address")