[TYPO3-ttnews] tt_news add Parameter to URL
Francesc Juliana
sad at sdf.com
Tue Apr 16 14:11:02 CEST 2013
Hello candy:
I have investigated how to do it.
I have been able to do it by code.
I have added parameter Type=1 . So the example adds the parameter &type=1 on
each new.
Edit class.tx_ttnews.php which is in folder (\typo3conf\ext\tt_news\pi)
search these lines:
if ($this->conf['useHRDates'] && $this->conf['useHRDatesSingle']) {
$this->piVars['year'] = $tmpY;
$this->piVars['month'] = $tmpM;
$this->piVars['day'] = $tmpD;
}
Just below paste the following code:
foreach ($linkWrap as &$valor){
$valor=str_replace("\" title=\"","&type=1\" title=\"",$valor );
}
Remember to replace Type=1 for your parameter and value.
I hope it helps.
Regards
Francesc
"candy" <stefan.drehmann at ctw-jena.de> escribió en el mensaje
news:mailman.1.1365601086.13530.typo3-project-tt-news at lists.typo3.org...
> Hello,
>
> i need some help :) How can i read out the current id from tt_news and add
> this as a parameter to the url
>
> a small review of my TYPOSCRIPT
>
> 2 = TMENU
> 2 {
> wrap = <ul class="naviMainLevel2"> | </ul>
> NO {
> wrapItemAndSub = <li> | </li>
> }
> ACT = 1
> ACT {
> wrapItemAndSub = <li class="active"> | </li>
> #get current tt_news id add it to the menu
> parameter.override.field = tt_news_id ||uid
> additionalParams.field = uid
> additionalParams.intval = 1
> additionalParams.wrap = &tx_events_pi1[newsId]=|
>
> }
> CUR = 1
> CUR < .ACT
> }
>
> url should then look like this:
> www.example.com/news/news-tech?&tx_events_pi1[newsId]=55
>
> thx for help!
>
More information about the TYPO3-project-tt-news
mailing list