[TYPO3-ttnews] Hide related news / links if none available

kimmo.helle at paitsio.com kimmo.helle at paitsio.com
Fri Mar 9 10:20:31 CET 2007


Thanks Oliver!

This was a great help! Now it validates from that part. I was now left  
with two problems. Now I seem to need a wrap after the header around  
the news items to style them within one box. I believe I need the same  
around the links as well.

Only this one needed. Hope someone has a solutions for this as well!

Cheers,
Kimmo


Lainaus Oliver Rowlands <oliver at liquidlight.co.uk>:

> Hi Kimmo,
>
> It looks like your problem is coming from the fact that you have added a
> wrap to 'plugin.tt_news.getRelatedCObject'.
>
> In your source code I can see that the related news article entries are
> wrapped by:
>
> <table class="contenttable"><tr><td>|</td></tr></table>
>
> This is actually invalid (X)HTML since this table is actually wrapped
> inside a <dl>.
>
> As a starting point I would recommend that you insure that the HTML you
> are outputting through the tt_news templates and your TS is actually valid.
>
> To do so you can use the W3C validator [http://validator.w3.org/] or the
> far more convenient Web Developers Toolbar in Firefox
> [https://addons.mozilla.org/firefox/60/].
>
> By default tt_news does not display the related news
>
> <dl class="news-single-related">|</dl>
>
> block if no news articles have been set in the 'Related news' field, so
> the problem must be coming from your custom TS.
>
> Good luck,
>
> Oliver
>
> kimmo.helle at paitsio.com wrote:
>> Hi all,
>>
>> After playing around with the single view and css, I've managed to get
>> everyting look like they should WHEN there are related news and links
>> selected for the news:
>>
>> http://www.f1-online.fi/tallit/spyker-f1/uutiset/uutiset/article/spykerille-neljae-testikuskia/
>>
>>
>> But the problem is that if I've not selected any related news or links
>> the h1 styling is still there and looks really stupid:
>>
>> http://www.f1-online.fi/tallit/spyker-f1/uutiset/uutiset/article/spyker-uusi-ulkonaekoensae/
>>
>>
>> Any ideas how to get these not to show up if none is available. Any help
>> would be highly appreciated as the season is almost here and these are
>> not ready yet!!!
>>
>> Cheers,
>> Kimmo Helle
>> www.f1-online.fi
>>
>
>
> --
> Oliver Rowlands
> :: Liquid Light ::
>
> E - oliver at liquidlight.co.uk
> W - http://www.liquidlight.co.uk
>
> T - 00 44 (0)845 6 58 88 35
> F - 00 44 (0)845 6 58 44 35
> _______________________________________________
> TYPO3-project-tt-news mailing list
> TYPO3-project-tt-news at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-tt-news
>





More information about the TYPO3-project-tt-news mailing list