Skip to content

Commit 12f215c

Browse files
Kajetan Dvoracekbeatrycze-volk
authored andcommitted
Add and update notes about URL generation
1 parent 5695328 commit 12f215c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Classes/Controller/DocumentController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public function mainAction()
118118
*
119119
* * `PAGE_NO` (for value of `tx_dlf[page]`)
120120
* * `DOUBLE_PAGE` (for value of `tx_dlf[double]`)
121+
* * `PAGE_GRID` (for value of `tx_dlf[pagegrid]`)
121122
*
122123
* @return string
123124
*/
@@ -155,8 +156,8 @@ protected function getUrlTemplate()
155156
return $result;
156157
};
157158

158-
// Generate two URLs that differ only in tx_dlf[page] and tx_dlf[double].
159-
// We don't know the order of page and double parameters, so use the values for matching.
159+
// Generate two URLs that differ in tx_dlf[page], tx_dlf[double] and tx_dlf[highlight].
160+
// We don't know the order of these parameters, so use the values for matching.
160161
$a = $make(2, 1, 0);
161162
$b = $make(3, 0, 1);
162163

Documentation/Developers/ClientSide.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ To dynamically show the metadata sections of the current page:
6666

6767
Rootline configuration is considered.
6868

69+
URLs and Slugs
70+
==============
71+
72+
For dynamic link generation on the client, a URL template is generated in ``DocumentController::getUrlTemplate()``.
73+
The template contains placeholders for the relevant parameters, which are then replaced by the current values in ``Controller::makePageUrl()``.
74+
The generated URL does not include a ``cHash``.
75+
76+
This solution is intended to avoid generating all possible URL variants on the backend while still supporting slugs.
77+
6978
Various
7079
=======
7180

0 commit comments

Comments
 (0)