Our client wanted a solution for displaying testimonials on his TYPO3 website.
The easiest way to accomplish this was creating some items that can be edited in the backend of the website and a front end plugin for the list and detail view.
One of the great things that TYPO3 provides is the TCA (Table Configuration Array), this global array defines the editable database tables and the relationship between them and how the fields in tables are rendered in backend forms and processed. The testimonials items are created using TCA, so they are available for easily editing in the backend.
Configure title field in TCA:
'title' => array ( 'exclude' => 0, 'label' => 'LLL:EXT:testimonial/locallang_db.xml:tx_testimonial.title', 'config' => array ( 'type' => 'input', 'size' => '30', 'eval' => 'trim', ) ), |
The configuration array provides support for localization of items, which we need, because the website is multi-language. Using the core support for realize this feature was a great help, and it increased the speed of development. The backend user can write a testimonial in the default language and then translate it into another website language.
For the actual content of the testimonial, we used the editor that TYPO3 provides – rtehtmlarea, this is really helpful, because the content can be formatted by the client or by an editor, as he wants, without the need to have knowledge about HTML tags.
The editor can manage the sorting of the items by using a feature of TYPO3 – manual sorting. This means that the items will have some little arrows that can be used for sorting, and the editor can decide the order in the list that appears in the front-end.
We created two plugins, one for the list, detail view, and one for displaying a random testimonial with link to the list (view all) and another link to the detail of that item. They use html templates, where the layout or the style can be changed without affecting the rest of code.
The settings are made using flexforms and typoscript.
We used flexforms to set list page, detail page using a wizard for selecting the page, this way it is easier for the client, then using typoscript.
Another feature is the use of TYPO3 cache system; it increases the speed of page loading. The cache for detail view is made using a hash of a string based on the testimonial parameter, that means that one page is saved in the cache table more times, with different content based on the parameter.
RealUrl provides automatic transformation of URLs into a virtual path, a so called “Speaking URL” and back again. The objective is that URLs shall be as human readable as possible. Realurl was used for encoding/decoding testimonial’s parameter; the links contains the title of the testimonial as a clean string, which is good for search engine optimization.
Function that decodes the human readable text into the parameter id:
function alias2idTestimonial($value){ if (!($result = $this->aliasToUidTestimonial[$value])) { $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('value_alias, value_id', 'tx_realurl_uniqalias', 'tablename="tx_testimonial" AND value_alias LIKE "' . $value . '"'); if (count($rows)) { $this->aliasToUidTestimonial[$value] = $rows[0]['value_id']; $result = $rows[0]['value_id']; } } return $result; } |
Testimonial extension gives the client ability of managing and displaying testimonials, using some powerful features like localization, WYSIWYG editor, visual sorting of items, and optimization of the content by using the cache system.
Our client wanted a solution for displaying testimonials on his TYPO3 website.
Finally, there’s another very important peculiarity of what does Cialis that brings it so high above its alternatives. It is the only med that is available in two versions – one intended for use on as-needed basis and one intended for daily use. As you might know, Viagra and Levitra only come in the latter of these two forms and should be consumed shortly before expected sexual activity to ensure best effect. Daily Cialis, in its turn, contains low doses of Tadalafil, which allows to build its concentration up in your system gradually over time and maintain it on acceptable levels, which, consequently, makes it possible for you to enjoy sex at any moment without having to time it.