Skip to content
This repository
Browse code

Fixes tag syntax (should end with %>, not >%)

  • Loading branch information...
commit d0af084bb5584d9828943c31cb24901adebda31f 1 parent 83ad8d4
Simon Welsh authored September 24, 2011

Showing 1 changed file with 20 additions and 20 deletions. Show diff stats Hide diff stats

  1. 40  docs/en/reference/built-in-page-controls.md
40  docs/en/reference/built-in-page-controls.md
Source Rendered
@@ -16,19 +16,19 @@ within another page control.
16 16
 
17 17
 ### Controlling Menus Datafeeds
18 18
 
19  
-#### <% control Menu(1) >%, <% control Menu(2) >%, ...
  19
+#### <% control Menu(1) %>, <% control Menu(2) %>, ...
20 20
 
21 21
 Returns a fixed level menu.  Because this only works in the top level, you can't use it for nested menus.  Used <%
22 22
 control Children %> instead. You can nest `<% control Children %>`.
23 23
 
24  
-#### &lt;% control ChildrenOf(page-url) &gt;%
  24
+#### &lt;% control ChildrenOf(page-url) %&gt;
25 25
 
26 26
 This will create a datafeed of the children of the given page. Handy if you want a list of the subpages under staff (eg
27 27
 the staff) on the homepage etc
28 28
 
29 29
 ### Controlling Certain Pages
30 30
 
31  
-#### &lt;% control Level(1) &gt;%, &lt;% control Level(2) &gt;%, $Level(1).Title, $Level(2).Content, etc
  31
+#### &lt;% control Level(1) %&gt;, &lt;% control Level(2) %&gt;, $Level(1).Title, $Level(2).Content, etc
32 32
 Returns the current section of the site that we're in, at the level specified by the numbers.  For example, imagine
33 33
 you're on the page __about us > staff > bob marley__:
34 34
 
@@ -36,7 +36,7 @@ you're on the page __about us > staff > bob marley__:
36 36
 *  `<% control Level(2) %>` would return the staff page
37 37
 *  `<% control Level(3) %>` would return the bob marley page
38 38
 
39  
-#### &lt;% control Page(my-page) &gt;%$Title&lt;% end_control &gt;%
  39
+#### &lt;% control Page(my-page) %&gt;$Title&lt;% end_control %&gt;
40 40
 
41 41
 "Page" will return a single page from the site tree, looking it up by URL.  You can use it in the `<% control %>` format.
42 42
 Can't be called using $Page(my-page).Title.
@@ -69,32 +69,32 @@ line*. This interface is implemented by the [api:SiteConfig] class.
69 69
 
70 70
 ### Controlling Parents and Children
71 71
 
72  
-#### &lt;% control Children &gt;%
  72
+#### &lt;% control Children %&gt;
73 73
 
74 74
 This will return the children of the current page as a nested datafeed.  Useful for nested navigations such as pop-out
75 75
 menus.
76 76
 
77  
-#### &lt;% control AllChildren &gt;%
  77
+#### &lt;% control AllChildren %&gt;
78 78
 
79 79
 This will show all children of a page even if the option 'show in menus?' is unchecked in the tab panel behaviour.
80 80
 
81  
-#### &lt;% control Parent &gt;% or $Parent.Title, $Parent.Content, etc
  81
+#### &lt;% control Parent %&gt; or $Parent.Title, $Parent.Content, etc
82 82
 
83 83
 This will return the parent page.  The $ variable format lets us reference an attribute of the parent page directly.
84 84
 
85 85
 ### Site Navigation - Breadcrumbs
86 86
 
87  
-#### &lt;% control Breadcrumbs &gt;%
  87
+#### &lt;% control Breadcrumbs %&gt;
88 88
 
89 89
 This will return a breadcrumbs widgets for the given page.  You can call this on any data-object, so, for example, you
90 90
 could display the breadcrumbs of every search result if you wanted.  It has a few options.
91 91
 
92  
-####  &lt;% control Breadcrumbs(3) &gt;%
  92
+####  &lt;% control Breadcrumbs(3) %&gt;
93 93
 
94 94
 Will return a maximum of 3 pages in the breadcrumb list, this can be handy if you're wanting to put breadcrumbs in a
95 95
 place without spilling
96 96
 
97  
-####  &lt;% control Breadcrumbs(3, true) &gt;%
  97
+####  &lt;% control Breadcrumbs(3, true) %&gt;
98 98
 
99 99
 Will return the same, but without any links. This is handy if you're wanting to put the breadcrumb list into another
100 100
 link tag.
@@ -126,7 +126,7 @@ When viewed on the Home page it will render like this
126 126
 $LinkOrCurrent ignores the section status, returning link instead.  $LinkOrSection ingores the current status, returning
127 127
 section instead.  Both of these options can simplify your CSS when you only have 2 different cases to consider.
128 128
 
129  
-#### &lt;% if LinkOrCurrent = current &gt;%
  129
+#### &lt;% if LinkOrCurrent = current %&gt;
130 130
 
131 131
 This is an alternative way to set up your menus - if you want different HTML for the current menu item, you can do
132 132
 something like this:
@@ -139,12 +139,12 @@ something like this:
139 139
 	<% end_if %>
140 140
 
141 141
 
142  
-#### &lt;% if LinkOrSection = section &gt;%
  142
+#### &lt;% if LinkOrSection = section %&gt;
143 143
 
144 144
 Will return true if you are on the current page OR a child page of the page. Useful for menus which you only want to
145 145
 show a second level menu when you are on that page or a child of it
146 146
 
147  
-#### &lt;% if InSection(page-url) &gt;%
  147
+#### &lt;% if InSection(page-url) %&gt;
148 148
 
149 149
 This if block will pass if we're currently on the page-url page or one of its children.
150 150
 
@@ -191,7 +191,7 @@ override `<% base_tag %>` with a specific piece of HTML, you can do something li
191 191
 
192 192
 ### Controlling Members and Visitors Data
193 193
 
194  
-#### &lt;% control CurrentMember &gt;%, &lt;% if CurrentMember &gt;% or $CurrentMember.FirstName
  194
+#### &lt;% control CurrentMember %&gt;, &lt;% if CurrentMember %&gt; or $CurrentMember.FirstName
195 195
 
196 196
 CurrentMember returns the currently logged in member, if there is one.  All of their details or any special Member page
197 197
 controls can be called on this.  Alternately, you can use `&lt;% if CurrentMember %>` to detect whether someone has logged
@@ -209,7 +209,7 @@ If the user is logged in this will print out
209 209
 	Welcome Back, Admin
210 210
 
211 211
  
212  
-#### &lt;% if PastMember &gt;%, &lt;% if PastVisitor &gt;%
  212
+#### &lt;% if PastMember %&gt;, &lt;% if PastVisitor %&gt;
213 213
 
214 214
 These controls detect the visitor's previous experience with the site:
215 215
 
@@ -237,11 +237,11 @@ call any of methods of the `[api:Date]` class on it.
237 237
 
238 238
 If you are using a DataObjectSet you have a wide range of methods you can call on it from the templates
239 239
 
240  
-#### &lt;% if Even &gt;%, &lt;% if Odd &gt;%, $EvenOdd
  240
+#### &lt;% if Even %&gt;, &lt;% if Odd %&gt;, $EvenOdd
241 241
 
242 242
 These controls can be used to do zebra-striping.  $EvenOdd will return 'even' or 'odd' as appropriate.
243 243
 
244  
-#### &lt;% if First &gt;%, &lt;% if Last &gt;%, &lt;% if Middle &gt;%, $FirstLast
  244
+#### &lt;% if First %&gt;, &lt;% if Last %&gt;, &lt;% if Middle %&gt;, $FirstLast
245 245
 
246 246
 These controls can be used to set up special behaviour for the first and last records of a datafeed.  `<% if Middle %>` is
247 247
 set when neither first not last are set.  $FirstLast will be 'first', 'last', or ''
@@ -270,7 +270,7 @@ that aren't accessible within `<% control SearchResults %>`.  These can be used
270 270
 
271 271
 ### Search Results
272 272
 
273  
-#### &lt;% if SearchResults.MoreThanOnePage &gt;%
  273
+#### &lt;% if SearchResults.MoreThanOnePage %&gt;
274 274
 
275 275
 Returns true when we have a multi-page datafeed, restricted with a limit.
276 276
 
@@ -288,11 +288,11 @@ CurrentPage returns the number of the page you're currently on, and TotalPages r
288 288
 
289 289
 This returns the total number of items across all pages.
290 290
 
291  
-#### &lt;% control SearchResults.First &gt;%, &lt;% control SearchResults.Last &gt;%
  291
+#### &lt;% control SearchResults.First %&gt;, &lt;% control SearchResults.Last %&gt;
292 292
 
293 293
 These controls return the first and last item on the current page of the datafeed.
294 294
 
295  
-#### &lt;% control SearchResults.Pages &gt;%
  295
+#### &lt;% control SearchResults.Pages %&gt;
296 296
 
297 297
 This will return another datafeed, listing all of the pages in this datafeed.  It will have the following data
298 298
 available:

0 notes on commit d0af084

Please sign in to comment.
Something went wrong with that request. Please try again.