documentation-developer
documentation-developer copied to clipboard
Enhance URL Twig functions doc
| Question | Answer |
|---|---|
| JIRA Ticket | CS-11493 for cross-SiteAccess |
| Versions | 4.5+ |
| Edition | All |
- Add an equivalent to 2.5/guide/siteaccess/#cross-siteaccess-links which was missing from 3.3 and 4.x
ibexa.url.alias- Avoid usage confusion by removing the parenthesis which make it looks like a function.
- Add an example usage with
path. - Fix anchor from table to section
TODO:
- Maybe add an available parameter list
- Test cross-SiteAccess links with dedicated domains (
Map\Host), multiple repositories, …
Checklist
- [ ] Text renders correctly
- [ ] Text has been checked with vale
- [ ] Description metadata is up to date
- [ ] Redirects cover removed/moved pages
- [ ] Code samples are working
- [ ] PHP code samples have been fixed with PHP CS fixer
- [ ] Added link to this PR in relevant JIRA ticket or code PR
As an early test of cross-SiteAccess, on a 4.5.3 clean install, I added the following at the top of templates/themes/standard/full/welcome_page.html.twig's {% block content %}:
{{ ibexa_path(ibexa_route("ibexa.url.alias", { 'locationId': 42, 'siteaccess': 'admin' })) }}
<br/>
{{ path('ibexa.url.alias', { 'locationId': 42, 'siteaccess': 'admin' }) }}
<br/>
{{ ibexa_url(location, {'siteaccess': 'admin'}, false) }}
<br/>
{{ ibexa_url(location, {'siteaccess': 'admin'}, true) }}