0
votes

Am using $GLOBALS['TSFE']->cObj->typoLink to generate a link and I've an additional parameter like this: ext__pluginname[d64]=31511 and would like to return something like a/b/c. I would then want TYPO3 to give me back the link so I can resolve it when clicked. I've already tried PersistedAliasMapper but won't allow to return anything with a slash in it. I've even tried a custom aspect mapper. I get the error:

Parameter "tx_ext__pluginname__d64" for route "enhancer_tx_ext__pluginname000000003e62d21a000000000514759a" must match "[^/]++" ("a/c" given) to generate a corresponding URL.

Am able to generate and resolve the slugs(urls). I can store them in db and retrieve them for that matter. No problem.

Am generating them from root page (uid 1).

How can i get this to work?

1
Have you added path segment field in you database and modal?gautamsinh mori
@gautamsinhmori Yes i haveJohn Miller
Don't you think you will have to write YAML configuration for your custom extension? Take a look at the EXT:News Docs here. Here @Georg Ringer has created routing for his extension. Hope this could be helpful to you!GNB

1 Answers

0
votes

I assume you already have created the desired path in a database table or view already, making use of the slug feature in the TYPO3 backend or creating it yourself.

You could then use the PersistedAliasMapper in your site config (config/sites/default/config.yaml).

If you need multiple values in a single path divided by slashes (not a combined slug field), take a look at the route configuration for the news extension. You just have to use database mappers instead of static ones, but keep in mind this may impact the performance of the routing!

As you did not provide much detail about your use case, I don't really understand why you need such a path structure with slashes.