Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8a1afae

Browse files
committed
Moved tip block to remove confusion
1 parent9c30509 commit8a1afae

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎components/routing/hostname_pattern.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,17 @@ instance, if you want to match both ``m.example.com`` and
176176
177177
return $collection;
178178
179-
..tip::
180-
181-
Make sure you also include a default option for the ``subdomain``
182-
placeholder, otherwise you need to include the subdomains value each time
183-
you generate the route.
184-
185179
..sidebar::Using Service Parameters
186180

187181
You can also use service parameters if you do not want to hardcode the
188182
hostname:
189183

184+
..tip::
185+
186+
Make sure you also include a default option for the ``subdomain``
187+
placeholder, otherwise you need to include the subdomains value each time
188+
you generate the route.
189+
190190
..configuration-block::
191191

192192
..code-block::yaml
@@ -197,6 +197,8 @@ instance, if you want to match both ``m.example.com`` and
197197
defaults:
198198
_controller:AcmeDemoBundle:Main:mobileHomepage
199199
domain:"%domain%"
200+
requirements:
201+
domain:"%domain%"
200202
201203
homepage:
202204
path:/
@@ -213,6 +215,7 @@ instance, if you want to match both ``m.example.com`` and
213215
<routeid="mobile_homepage"path="/"host="m.example.com">
214216
<defaultkey="_controller">AcmeDemoBundle:Main:mobileHomepage</default>
215217
<defaultkey="domain">%domain%</requirement>
218+
<requirementkey="domain">%domain%</requirement>
216219
</route>
217220
218221
<routeid="homepage"path="/">
@@ -230,6 +233,7 @@ instance, if you want to match both ``m.example.com`` and
230233
'_controller' => 'AcmeDemoBundle:Main:mobileHomepage',
231234
'domain' => '%domain%',
232235
), array(
236+
'domain' => '%domain%',
233237
), array(), 'm.{domain}'));
234238
235239
$collection->add('homepage', new Route('/', array(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp