Skip to content

Commit c9552e4

Browse files
committed
docs: make Note more prominent
1 parent e5a3bb9 commit c9552e4

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

user_guide_src/source/general/common_functions.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ Miscellaneous Functions
374374

375375
.. note:: This function requires the controller/method to have a route defined in **app/Config/routes.php**.
376376

377+
.. important:: ``route_to()`` returns a *route*, not a full URI path for your site.
378+
If your **baseURL** contains sub folders, the return value is not the same
379+
as the URI to link. In that case, just use :php:func:`url_to()` instead.
380+
See also :ref:`urls-url-structure`.
381+
377382
Generates a route for you based on a controller::method combination. Will take parameters into effect, if provided.
378383

379384
.. literalinclude:: common_functions/009.php
@@ -386,10 +391,6 @@ Miscellaneous Functions
386391

387392
.. literalinclude:: common_functions/011.php
388393

389-
.. note:: ``route_to()`` returns a route, not a full URI path for your site.
390-
If your **baseURL** contains sub folders, the return value is not the same
391-
as the URI to link. In that case, just use :php:func:`url_to()` instead.
392-
393394
.. php:function:: service($name[, ...$params])
394395
395396
:param string $name: The name of the service to load

user_guide_src/source/general/urls.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Your URLs can be defined using the :doc:`URI Routing </incoming/routing>` featur
1515

1616
The :doc:`URI Library <../libraries/uri>` and the :doc:`URL Helper <../helpers/url_helper>` contain functions that make it easy to work with your URI data.
1717

18+
.. _urls-url-structure:
19+
1820
URL Structure
1921
=============
2022

0 commit comments

Comments
 (0)