A customer of ours had created his own news page. It consisted of one big HTMl page that he had added to over the past 15 years. Unfortunately it was one big HTMl page and thus not very practical for Search Engine Optimization. At least we thought we could do more.

To restructure it according to our SEO’s requirements in Typo3 we manually created a page for each news item. That was a bit of work, but I couldn’t think of a better solution. Each new page was then put below a page for the appropriate year to make things easier to find. (And to create more pages for our SEO). I then added a sitemap with abstract to the yearly pages to help the users navigate. But even with all kinds of CSS formating that just didn’t cut it.

The yearly pages themselves were supposed to make the visitors want to go and look at the  detail pages a sort of teaser effect. For that we needed a ‘more’ button and a teaser image from the content element. – At first I thought of adding the images to each page resource and then creating a menu from that. We had done that often enough. That would have meant editing each page property though and would have meant more work for the customer when he later adds news items.

So what I did, was to re-write the standard Typo3 sitemap with abstracct. Now the yearly pages look really great and they are easily added to.
OK, so here’s the code:

menu {
 news = HMENU
 news {
 special = directory
 special.value.field = pages
 wrap = <div>|</div><hr>
 1 = TMENU
 1 {
 NO = 1
 NO {
 allWrap = <hr><div>|</div>
 stdWrap {
 htmlSpecialChars = 1
 }
 ATagParams = target = "_top"
 afterWrap =  |
 linkWrap = <h2>|</h2>
 after.cObject = COA
 after.cObject {
 wrap = | 

 10 < styles.content.get
 10 {
 select {
 pidInList.field = uid
 max = 1
 }
 renderObj = COA
 renderObj {
 wrap = <table cellpadding="0" cellspacing="0" border="0"><tr>|</tr></table>
 10 = TEXT
 10 {
 wrap = <td>|</td>
 field = bodytext
 stdWrap {
 crop = 360 | &nbsp;[...]
 parseFunc < lib.parseFunc_RTE
 parseFunc.nonTypoTagStdWrap.HTMLparser {
 keepNonMatchedTags = 0
 htmlSpecialChars = 2
 allowTags = img,u,ul,ol,b,strong,li,em,i,p,br,h1,h2,h3
 removeTags = a
 }
 }
 }
 20 = IMAGE
 20 {
 wrap = <td>|</td>
 file {
 import = uploads/pics/
 import.field = image
 width = 110
 }
 altText.field = header
 titleText.field = header
 }
 }
 }
 20 = TEXT
 20 {
 required = 1
 data = field : tx_gstaliaspro_aliaspro
 wrap = <a href="|">more...</a><br />
 }
 } # after.cObject
 } # NO
 target = page
 } # 1
 } # news

Now overload the standard definition of sitemap 4:

tt_content.menu.20.4 < menu.news

For all those that like me find formating code very important, I excuse myself. WordPress just went and swallowed most of the spaces – as it should according to the HTML definition. One of these days when I have lots of time I will go and find a better solution for posting code.


Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Beaches

Certified Translation Services over 2.000 professional translators

Certified Translation Services over 2.000 professional translators ready to handle your assignment. We deliver within 24 hours your documents translated and certified in the country where they should be used. Certified Translation Services by professional certified translators. The Native Translator is one of the few agencies that are able to provide certified translations all around the world. Thanks to our extensive network

Beaches

Marketing / PR Translation

A general rule in translation is that a translation should not sound like a translation, but as an original. This is especially important for Advertising, Marketing and PR translations. It requires a lot of creativity; one has to consider the culture of the target language and the expectations of the people abroad. Compared to technical translations where in most cases the text has to be translated sentence by sentence. In a marketing text you have to consider what the source text has/wants to express and reflect the meaning properly in the foreign language. The difficulty is that the original text with

Computers

Typo3 slow – accelerate with APC

My SEO is always complaining that certain Typo3 domains are extreemly slow. First of all I deleted all the files in the directory typo3temp and all its subdirectories. Then I created indexes in MySQL. Still not good enough! The APC accelerator sounded good and the installation was supposed to be easy.