[Typo3] generate cHash value

Dmitry Dulepov typo3 at fm-world.ru
Sat Jul 23 18:21:00 CEST 2005

Argh... It probably was in the earlier edition of this article (when
people could comment on it). Anyway, here is the code that I use in
frontend plugins:

function linkPage($pid) {
        $typolink_conf = array(
            "no_cache" => false, // cache this page
            "returnLast" => "url", // don't wrap the link in anchor tags
            "parameter" => $pid, // page id
            "additionalParams" = "&xx_myext[aaa]=bbb", // extra params
            "useCacheHash" => true); // generate cHash
        return $this->cObj->typolink("", $typolink_conf);

Using shortMD5 is not "portable" because cHash generation algorithm may
change. But typolink function will always use proper way to generate cHash.


Daniel wrote:
> hi Dmitry,
> thank you for your answer.
> i can not find the comments you're talking about .. i was talking
> about this<http://typo3.org/development/articles/the-mysteries-of-chash/>article.
> did you find another version of it?
> daniel

More information about the TYPO3-english mailing list