MightyA
MightyA

Reputation: 26

How to work with the typo3 viewhelper documentation?

I found this example in the TYPO3 documentation:

<f:be.uri route="web_ts" parameters="{id: 92}"/>

Unfortunately the doc doesn't explain, what "route" is for.

"parameters" is for key-value-pairs (given to TYPO3 to work with), but unfortunately it isn't mentioned, how to add more than one and how they would become seperated.

Furthermore the doc is mentioning an argument "referenceType", which also isn't explained.

May I ask for some help/explanation for it?

Edit: The title of the question doesn't really reflect the nature of my question. stackoverflow wasn't allowing me to use a more precise one.

Upvotes: 0

Views: 85

Answers (1)

Georg Ringer
Georg Ringer

Reputation: 7939

The documentation https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/BackendRouting/Index.html explains backend routes quite well.

Furthermore the backend module "Configuration" > Backend Routes lists all available routes.


The core itself is most of the time a good example how ViewHelpers can be used, so a random example which covers quite a lot is the following one

<a href="{f:be.uri(route:'site_redirects', parameters: '{action: \'overview\', demand: demand.parameters, page: 1}')}" title="{f:translate(extensionName: 'fluid', key:'widget.pagination.first')}">
   <core:icon identifier="actions-view-paging-first" />
</a>

Checking the implementation, referenceType can either be url or absolute to change the type of urls generated. I don't see currently the need to set this, so I guess you won't need it as well.

Upvotes: 0

Related Questions