File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -149,12 +149,11 @@ csrfToken The current CSRF token
149
149
150
150
.. code-block :: php
151
151
152
- <?= $this->Html->meta(
152
+ echo $this->Html->meta(
153
153
'favicon.ico',
154
154
'/favicon.ico',
155
155
['type' => 'icon']
156
156
);
157
- ?>
158
157
// Output (line breaks added)
159
158
// Note: The helper code makes two meta tags to ensure the
160
159
// icon is downloaded by both newer and older browsers
@@ -170,12 +169,11 @@ csrfToken The current CSRF token
170
169
rel =" shortcut icon"
171
170
/>
172
171
173
- <?= $this->Html->meta(
172
+ echo $this->Html->meta(
174
173
'Comments',
175
174
'/comments/index.rss',
176
175
['type' => 'rss']
177
176
);
178
- ?>
179
177
// Output (line breaks added)
180
178
<link
181
179
href =" http://example.com/comments/index.rss"
@@ -187,22 +185,24 @@ csrfToken The current CSRF token
187
185
This method can also be used to add the meta keywords and
188
186
descriptions. Example::
189
187
190
- <?= $this->Html->meta(
188
+ echo $this->Html->meta(
191
189
'keywords',
192
190
'enter any meta keyword here'
193
191
);
194
- ?>
195
192
// Output
196
193
<meta name="keywords" content="enter any meta keyword here" />
197
194
198
- <?= $this->Html->meta(
195
+ echo $this->Html->meta(
199
196
'description',
200
197
'enter any meta description here'
201
198
);
202
- ?>
203
199
// Output
204
200
<meta name="description" content="enter any meta description here" />
205
201
202
+ echo $this->Html->meta('csrfToken');
203
+ // The CsrfProtection middleware must be loaded for your application
204
+ <meta name="csrf-token" content="CSRF token here" />
205
+
206
206
In addition to making predefined meta tags, you can create link elements::
207
207
208
208
<?= $this->Html->meta([
You can’t perform that action at this time.
0 commit comments