[TYPO3-mvc] Link viewhelper and 'back pid'
Christian Zenker
christian.zenker at 599media.de
Thu Sep 30 12:07:02 CEST 2010
> thanks for your reply. Would you care to elaborate on why you would call
> it bad programming?
Sure. First of all sexy URLs are as short as possible :) .
Secondly I had a bad experience with an older version of cal (I guess it
was cal - don't pin me on that). It also included some backPid
functionality with a history. This filled the cache with almost
identically pages just having different links to (literally) the same
content. And indexed search would index lots of identically pages making
the search almost useless as you could get the same content as 10
different results. And what about Google and duplicate content? Well, you
could use rel="canonical" or "no-index" - but should this be done
automatically or do you hope for the user to take care of?
I just think that parameters, that don't change anything you see on a
webpage, just should not be in the url.
IMHO there are better ways:
I'd guess in most cases you would not need that url parameter as you could
easily determine the backPid from the record itself. For example if you
have a news item - you should think about if you could determine the
backPid from the category of the news. Or if the backPid depends on a page
in the page tree, use a TypoScript setting you can override. Or maybe the
backPid depends on the pid of the record?
The best way IMHO would be to store the backPid in a session. I'm not sure
how to do that in TYPO3 - but it *could* be an alternative.
> Relying on JS is possible in most cases, but not always. Adding an extra
> argument manually is less clean than using a supported argument - ?
There is nothing wrong if you extend the linkViewHelper to a custom
viewHelper in your extension! I just fear that the viewHelper becomes
another stdWrap with thounsands (of somehow redundant) parameters. So why
add another argument if it could as well be done with the standard
parameters. I don't see how this should become any easier with an
additional parameter. Or am I missing something?
Christian
More information about the TYPO3-project-typo3v4mvc
mailing list