[TYPO3-ttnews] Hide related news / links if none available
Oliver Rowlands
oliver at liquidlight.co.uk
Thu Mar 8 23:15:15 CET 2007
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
More information about the TYPO3-project-tt-news
mailing list