-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemoNewBlockmarks.html
554 lines (468 loc) · 19.5 KB
/
demoNewBlockmarks.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
<html>
<head>
<script type="text/javascript" src="scripts/XRegExp.js"></script>
<script type="text/javascript" src="scripts/shCore.js"></script>
<link href="styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="scripts/shBrushWSM.js"></script>
<script type="text/javascript" src="scripts/shBrushxWSM.js"></script>
<link href="styles/shCoreWSM.css" rel="stylesheet" type="text/css" />
<link href="styles/shCorexWSM.css" rel="stylesheet" type="text/css" />
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 18px;
padding: 20px;
}
</style>
</head>
<body>
<h2>Haben wir schon</h2>
<h3>Standard-Blockmarkierungen</h3>
<pre class="brush: wsm;">
<!IoRangeBack> ... <!/IoRangeBack>
<!IoRangeBreadCrumb> ... <!/IoRangeBreadCrumb>
<!IoRangeConditional> ... <!/IoRangeConditional>
<!IoRangeData> ... <!/IoRangeData>
<!IoRangeDragDrop> ... <!/IoRangeDragDrop>
<!IoRangeDynLink> ... <!/IoRangeDynLink>
<!IoRangeHit> ... <!/IoRangeHit>
<!IoRangeList> ... <!/IoRangeList>
</pre>
<hr>
<h3>Ausführung von Code zur Laufzeit oder Publizierung</h3>
<pre class="brush: wsm;">
<!IoRangeRDExecute>
...
Dieser Block wird nur innerhalb des CMS zur Laufzeit (SmartEdit/Preview)
ausgeführt und nicht bei der Publizierung. Er muss entsprechenden
Code (z.B. C#, VBScript, PHP etc. enthalten) => Läuft innerhalb
des CMS AppPool und unterliegt diesen Regeln.
...
<!/IoRangeRDExecute>
<!IoRangePreExecute>
...
Dieser Block wird nur innerhalb des CMS zur Laufzeit (Preview/Publish)
ausgeführt und nicht im SmartEdit. Er muss entsprechenden Code
(z.B. C#, VBScript, PHP etc. enthalten) => PreExecute-Regeln via
extra AppPool.
...
<!/IoRangePreExecute>
</pre>
<hr>
<h2>Mal was neues</h2>
<h3>Rendermodes 2.0</h3>
<p>
Int:0 When you open the page in page preview mode.
<br> Int:1 When you open the page in SmartEdit.
<br> Int:2 When you publish the page.
<br>
</p>
<pre class="brush: wsm;">
= Modus 0
<!IoRangePreviewMode> ... <!/IoRangePreviewMode>
alias für
<!IoRangeNoRedDotMode> ... <!/IoRangeNoRedDotMode>
= Modus 1
<!IoRangeEditMode> ... <!/IoRangeEditMode>
<!IoRangeEditModeOn> ... <!/IoRangeEditModeOn>
<!IoRangeEditModeOff> ... <!/IoRangeEditModeOff>
alias für:
<!IoRangeRedDotMode> ... <!/IoRangeRedDotMode>
<!IoRangeRedDotEditOnly> ... <!/IoRangeRedDotEditOnly>
<!IoRangeNoEditMode> ... <!/IoRangeNoEditMode>
= Modus 2
<!IoRangePublishMode> ... <!/IoRangePublishMode>
</pre>
<hr>
<h3>Definitionsblöcke</h3>
<pre class="brush: wsm;">
<!IoRangePreDefinition> oder <!IoRangeTemp>
...
Variablen (MetaElemente), welche nur innerhalb der Content-Klasse temporär zur Verfügung stehen.
...
<%tempVar%> = 3000
...
<%valueIntA%> = 0
...
<%ArrayElement%> = ("A","B","C","D","1")
...
<!/IoRangePreDefinition> oder <!/IoRangeTemp>
</pre>
<hr>
<h3>Zugriff auf die Session im SmartEdit/SmartTree (Vorschau etc.)</h3>
<pre class="brush: wsm;">
<!IoRangeSession> oder <!IoRangeUiSession>
...
Variablen (MetaElemente), welche nur innerhalb der aktuellen Session (GUI only)
temporär zur Verfügung stehen. Diese können gesetzt oder abgefragt werden.
...
<%lastAction%> = "..." Aus Session
...
"..." = <%lastAction%> In Session
...
<!/IoRangeSession> oder <!/IoRangeUiSession>
</pre>
<hr>
<h3>If/Else - Bedingung</h3>
<pre class="brush: wsm;">
<!IoRangeIf>
<%ConditionElement%>
<!IoRangeThen> ... <!/IoRangeThen>
<!IoRangeElse> ... <!/IoRangeElse>
<!/IoRangeIf>
</pre>
<hr>
<h3>If Exists/Else - Bedingung</h3>
<pre class="brush: wsm;">
<!IoRangeIfExists>
<%Element%>
<!IoRangeThen> ... <!/IoRangeThen>
<!IoRangeElse> ... <!/IoRangeElse>
<!/IoRangeIfExists>
</pre>
<hr>
<h3>Switch/Case - Bedingung</h3>
<pre class="brush: wsm;">
<!IoRangeSwitch>
<%ConditionElement%>
<!IoRangeCase> <%CaseElement%> ... <!/IoRangeCase>
<!IoRangeCase> <%CaseElement%> ... <!/IoRangeCase>
<!IoRangeCase> <%CaseElement%> ... <!/IoRangeCase>
<!IoRangeCase> <%CaseElement%> ... <!/IoRangeCase>
<!IoRangeElse> ... <!/IoRangeElse>
<!/IoRangeSwitch>
</pre>
<hr>
<h3>ForEach - Schleife</h3>
<pre class="brush: wsm;">
<!IoRangeForEach>
...
<%ArrayElement%>
...
<!/IoRangeForEach>
</pre>
<hr>
<h3>For Do - Schleife</h3>
<pre class="brush: wsm;">
<!IoRangeFor>
<%ConditionElement%>
<!IoRangeDo>
...
<!/IoRangeDo>
<!/IoRangeFor>
</pre>
<hr>
<h3>Einfache Berechnungen</h3>
<pre class="brush: wsm;">
operator + - / * ≈ auf Typ: FLOAT, INT oder DATE
<!IoRangeMath>
...
<%valueIntA%> - 1
...
<%valueIntA%> + <%tempVar%>
...
<%valueIntA%> + <%valueIntB%>
...
<%valueDateA%> - (1).asDate("day")
...
<%valueDateA%> - (1).asDate("hour")
...
<!/IoRangeMath>
</pre>
<h4>Beispiel:</h4>
<pre class="brush: wsm;">
<!IoRangePreDefinition> oder <!IoRangeTemp>
...
<%tempVar%> = <!IoRangeMath><%valueIntA%> + 3000<!/IoRangeMath>
...
<!/IoRangePreDefinition> oder <!/IoRangeTemp>
</pre>
<hr>
<h3>Include vom Filesystem des Servers</h3>
<pre class="brush: wsm;">
<!IoRangeInclude>
...
<%FileRepositoryElement%>
...
<!/IoRangeInclude>
</pre>
<hr>
<h3>Für Kommentare innerhalb der Templates, welche beim Publizieren verschwinden können</h3>
<pre class="brush: wsm;">
<!IoRangeComment>
...
Hier steht Text, welcher beim Publizieren nicht ausgegeben wird (removed)
...
<!/IoRangeComment>
= Ersatz für <!IoRangeNoRedDotMode><!IoRangeRedDotMode> ... <!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
</pre>
<hr>
<h3>Eine Idee ähnlich wie javaDOC, damit man automatisch eine CK/Template Doku erzeugen kann</h3>
<pre class="brush: wsm;">
<!IoRangeDocumentation>
...
Hier steht Text, welcher als Documentation innerhalb der Content-Klassen dient.
Diese Blöcke können später in einem noch zu definierenden Format
(z.B. Markdown etc.) ausgegeben, abgefragt oder auf andere Art und Weise verwendent werden.
...
<!/IoRangeDocumentation>
</pre>
<hr>
<h3>Keine Ausgabe bei der Publizierung, jedoch ohne Einschränkung auf die Elementeigenschaften</h3>
<pre class="brush: wsm;">
<!IoRangeNoOutput>
...
Hier steht Element, welches z.B. für
<!IoRangeConditional> ... <!/IoRangeConditional>
oder
<!IoRangeList> ... <!/IoRangeList>
benötigt wird (z.B. Liste etc)
...
<!/IoRangeNoOutput>
= Ersatz für <!IoRangeNoRedDotMode><!IoRangeRedDotMode> ... <!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
Beispiel:
Vorher:
<!IoRangeDynLink><a id="<%infoPageID%>"><%headlinePage%></a>
<!IoRangeNoRedDotMode><!IoRangeRedDotMode><%anchorDynamic%><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
<!/IoRangeDynLink>
Nachher:
<!IoRangeDynLink><a id="<%infoPageID%>"><%headlinePage%></a>
<!IoRangeNoOutput><%anchorDynamic%><!/IoRangeNoOutput>
<!/IoRangeDynLink>
</pre>
<hr>
<h3>Navigation</h3>
<h4>In den Navigation-Templates</h4>
<i>Hinweis => Jetzt Referenzieren möglich, ähnlich (Navigation ... guid: oder GetPage(Guid:) ...)</i>
<pre class="brush: wsm;">
<a href="<%ListNavigationA%>" target="_blank"><%pageHeadline%></a>
<!IoRangeIfExists>
<%ListNavigationA%> <!-- Bsp: HasChildren() und nachfolgend navigation:nextlevel -->
    <!IoRangeThen> <!IoRangeNavigation><%ListNavigationA%><!/IoRangeNavigation> <!/IoRangeThen>
    <!IoRangeElse> <!IoRangeNavigation><%ListNavigationB%><!/IoRangeNavigation> <!/IoRangeElse>
<!/IoRangeIfExists>
</pre>
<h4>Aufruf Outputarea</h4>
<i>Hinweis => Jetzt Referenzieren möglich, Mapping und weitere Eigenschaften im Element ähnlich Liste/Container.</i>
<pre class="brush: wsm;">
<!IoRangeNavigationArea><%NavigationElementBreadcrumb%><!/IoRangeNavigationArea>
</pre>
<h4>Boolsche Werte bzw. ein generisches Navigation-Element mit folgenden Optionen</h4>
<pre class="brush: wsm;">
Indizes:
<%FirstIndex%>
<%CurrentIndex%>
<%LastIndex%>
<%Parent%> ?? Noch nötig ??
Bool:
<%IsHidden%> ?? Noch nötig oder reicht der "Erscheinungszeitraum"
und/oder "Nicht in der Navigation anzeigen" bei Seiteneigenschaften ??
<%IsRoot%> ?? Noch nötig ??
Int32:
<%CurrentLevelCount%>
<%CurrentDepth%>
<%Count%>
</pre>
<h4>Beispiele</h4>
<pre class="brush: wsm;">
<!IoRangeConditional>
<!IoRangeConstraint>
<%FirstIndex%> -ne <%CurrentIndex%>
<!/IoRangeConstraint>
<!IoRangeThen>
<!IoRangePreDefinition>
<%tempVar%> = <!IoRangeMath><%valueIntA%> + 3000 <!/IoRangeMath>
<!/IoRangePreDefinition>
<!/IoRangeThen>
<!IoRangeElse>
<!IoRangeInclude>
<%FileRepositoryElement%>
<!/IoRangeInclude>
<!/IoRangeElse>
<!/IoRangeConditional>
</pre>
<pre class="brush: wsm;">
<!IoRangeConditional>
<!IoRangeConstraint>
<%FirstIndex%> -ne ("46012D6C5A5F4624B37424E2E3677202").asGuid()
<!/IoRangeConstraint>
<!IoRangeThen> ... <!IoRangeThen>
<!IoRangeElse> ... <!IoRangeElse>
<!/IoRangeConditional>
</pre>
<hr>
<h3>Image-Gallery</h3>
<pre class="brush: wsm;">
<!IoRedDot_ImageListMyGallery>
<!IoRangeImageList>
<span class="xxx">
<img src="<%ImageListMyGallery%>" alt="<%attributeDescription%> (Quelle: <%attributeSource%>)" />
</span>
<!/IoRangeImageList>
</pre>
<hr>
<br>
<br>
<br>
<hr>
<h3>Variante A1</h3>
<p>
(angleich an WSM DS Logik) mit Constraint-Block und if/else
<br> Ausgabe bei if/else kann dann ganz anderer Text sein
</p>
<pre class="brush: wsm;">
<!IoRangeConditional>
<!IoRangeConstraint><%Element%><!/IoRangeConstraint>
<!IoRangeThen> ... <!IoRangeThen>
<!IoRangeElse> ... <!IoRangeElse>
<!/IoRangeConditional>
</pre>
<hr>
<h3>Variante A2</h3>
<p>
So notiert, könnte man auch weitere, „echte“ Constraints formulieren, wie im DS:
<br>
<br>
<b>-eq (equals):</b>
<br>Checks whether the attribute value and the comparison value of the value parameter are equal.
<br>
<br>
<b>-ne (not equal):</b>
<br>Checks whether the attribute value and the comparison value of the value parameter are not equal.
<br>
<br>
<b>-gt (greater than):</b>
<br>Checks whether the attribute value is greater than the comparison value from the value parameter.
<br>
<br>
<b>-ge (greater equal):</b>
<br>Checks whether the attribute value is greater than or equal to the comparison value from the value parameter.
<br>
<br>
<b>-lt (less than):</b>
<br>Checks whether the attribute value is less than the comparison value from the value parameter.
<br>
<br>
<b>-le (less equal):</b>
<br>Checks whether the attribute value is less than or equal to the comparison value from the value parameter.
<br>
<br>
<b>-contains/-notcontains:</b>
<br>Checks whether the value parameter's comparison value is/is not contained in the attribute's first value. Other
values of multivalued attributes are not evaluated.
<br>
<br>
<h4>plus weitere:</h4>
<b>-and/-or</b><br>
<b>-like/-notlike</b><br>
<b>-match/-notmatch</b><br>
<br>
</p>
<h4>Note</h4>
<p>
<b>-containsall/-notcontainsall:</b>
<br> For value lists of multivalued attributes: Checks whether all comparison values from value are contained in the
attribute values. To negate the statement, use the not prefix.
<br>
<br>
<b>-containsany/--notcontainsany:</b>
<br> For value lists of multivalued attributes: Checks whether at least one comparison value of the value parameter is
contained in the attribute values. To negate the statement, use the not prefix.
<br>
<br>
<b>-existsinall/-notexistsinall:</b>
<br> For value lists of multivalued attributes: Checks whether all attribute values are contained in the comparison values
of value. To negate the statement, use the not prefix.
<br>
<br>
<b>-existsinany/-notexistsinany:</b>
<br> For value lists of multivalued attributes: checks whether at least one attribute values contained in the comparison
values of value. To negate the statement, use the not prefix.
<br>
<br>
</p>
<pre class="brush: wsm;">
<!IoRangeConditional>
<!IoRangeConstraint><%Element%> -ne ("") <!/IoRangeConstraint>
<!IoRangeThen> ... <!IoRangeThen>
<!IoRangeElse> ... <!IoRangeElse>
<!/IoRangeConditional>
</pre>
<br>
<h4>(weitere Constraint Beispiele)</h4>
<pre class="brush: wsm;">
<!IoRangeConstraint><%ArrayElement%> -containsany ("A", "B", "C") <!/IoRangeConstraint>
<!IoRangeConstraint><%ElementTypeNumber%> -gt 5 <!/IoRangeConstraint>
</pre>
<br>
<h4>...natürlich auch mit Verkettung</h4>
<pre class="brush: wsm;">
<!IoRangeConstraint>
<%ElementATypeNumber%> -le 100 -AND <%ElementBTypeNumber%> -existinany ("3", "7", "9").asInt32()
<!/IoRangeConstraint>
</pre>
<hr>
<h3>Variante B</h3>
<p>
wie vor, jedoch vereinfachte Kurzschreibweise
<br> Gibt Element bei vorhanden/gefüllt aus, ansonsten den Else Teil
</p>
<pre class="brush: wsm;">
<!IoRangeConditional>
<%Element%>
<!IoRangeElse> ... <!IoRangeElse>
<!/IoRangeConditional>
</pre>
<hr>
<h3>Inline-Funktionen</h3>
<i>ähnlich wie im Delivery Server oder RenderTags ;) like .NET C# - Einige Beispiele:</i>
<pre class="brush: wsm;">
Bool:
<%Element.StartsWidth()%>
<%Element.EndsWidth()%>
String:
<%Element.ToLower()%>
<%Element.ToUpper()%>
<%Element.SubString()%>
<%Element.Replace()%>
<%Element.RegExReplace()%>
Int32:
<%Element.IndexOf()%>
<%Element.LastIndexOf()%>
<%Element.Length()%>
Encoding:
<%Element.HtmlEncode()%>
<%Element.HtmlDecode()%>
<%Element.UrlEncode()%>
<%Element.UrlDecode()%>
<%Element.HtmlAttributeEncode()%>
<%Element.JavaScriptEncode()%>
<%Element.JavaScriptDecode()%>
<%Element.JsonEncode()%>
<%Element.JsonDecode()%>
<%Element.MD5Encode()%>
<%Element.Base64Encode()%>
<%Element.Base64Decode()%>
Casting:
("46012D6C5A5F4624B37424E2E3677202").asGuid()
("1234").asInt32()
("12345678").asInt64()
("1").asBoolean()
<%Element.asGuid()%>
<%Element.asString()%>
<%Element.asInt32()%>
<%Element.asInt64()%>
<%Element.asBoolean()%>
<%Element.asDate()%>
</pre>
<hr>
<script type='text/javascript'>
SyntaxHighlighter.config.bloggerMode = false;
SyntaxHighlighter.config.tagName = "pre";
SyntaxHighlighter.defaults['first-line'] = 10;
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.all();
</script>
</body>
</html>