[TYPO3-ttnews] Success - RIP tt_news, hello tx_news

Thomas Skierlo pubtsk1 at pix-pro.eu
Sun Apr 1 18:21:37 CEST 2012


>> 1) Category menu (Templates/Category/List.html). Is there a possibility
>> to sort the categories for FE rendering? The "sorting" field from DB
>> 'tx_news_domain_model_category' is respected only in the BE.
> if it looks like a bug, don't hesitate to open an issue at forge.
Well, I'm very cautious with the phrase "bug". My (small) problem 
wouldn't be one if I would have created the categories in the right 
sequence (for the frontend).
>> 2) Single view: In my old tt_news setup I had links to previous/next
>> article in single view. Is there a way to get this page-browser
>> functionality into tx_news?
> I won't do that as it is just not possible know at the single view which
> news are the one before and after as e.g. in many installations one
> single view page is used for multiple different list+latest view which
> could be even have some category/whatever filtering...
I agree. A next/previous article link would depend on uid sorting, which 
might not be the right approach for everybody. If time allows I will try 
it with a view helper.
>> 3) I wanted dramatical changes to the templates and the styles (less
>> divs, less and more descriptive classes a.s.o.).
> If you got time, wanna provide a better demo template?
I would love to do that, but my current solution is based upon too many 
central styles and classes (like self clearing floats via clearfix, 
rounded corners by jQuery UI a.s.o.). Right now I'm only using about 50% 
of the lines from the "news-advanced.css", not knowing if non-used 
styles like ".news .nav" or ".news-category-view" might get any 
importance later.

To reduce the divs and add more semantic classes I only changed the 
Layout/General to not include any div. Instead I moved them to the 
content-section of the Detail/List templates. So I get something like:

For frontpage list view (using custom Template Layout)

<divclass="news news-list-frontpage ui-corner-all">
<divclass="article articletype-0 ui-corner-all">
         xxx
</div>
</div>


For standard list view:

<divclass="news news-list ui-corner-all">
<divclass="article articletype-0 ui-corner-all">
         xxx
</div>
</div>

For single-view:

<divclass="news news-single">
<divclass="article ui-corner-all">
</div>
</div>

For the category menu:

<divclass="news news-catmenu ui-corner-all">
<h3class="tsc-widget-header tsc-widget-header-0 ui-corner-top">
         News by category
</h3>
</div>

For the date menu:

<divclass="news news-datemenu ui-corner-all">
<h3class="tsc-widget-header tsc-widget-header-0 ui-corner-top">
         News by date
</h3>
</div>

This saves at least two divs per plugin - and it's more semantic for the 
coder, and for the beginners. But to change it for the whole extension 
most files from the Public and Private directory must be changed.

By the way. What is this for:

"<f: renderFlashMessages class="tx-news-flash-message" />"

In the General.html Layout file?

Besides that I've found a possible bug in the 
Templates/Category/List.html. With my NetBeans IDE I can view a diff, 
but not create a diff-patch (at least I don't know how). I can't even 
copy lines containing fluid formatting to thunderbird mail. Can anybody 
tell me how to create a diff patch with NetBeans?

My last question: How do I comment out a line in an html template file 
with fluid lines. HTML comments seem not to be respected by fluid (I had 
to delete commented lines to convince fluid not to notice them).

TIA

Thomas









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