.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ============================= Generic marrkers for tt\_news ============================= :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2009-04-10T14:35:19.710000000 :Classification: ttnewsgenericmarkers :Keywords: ts, tt_news, markers, extend tt_news :Author: Georg Ringer :Email: www.ringer.it :Info 4: :Language: en |img-1| |img-2| Generic marrkers for tt\_news - ttnewsgenericmarkers .. _Generic-marrkers-for-tt-news: Generic marrkers for tt\_news ============================= Extension Key: ttnewsgenericmarkers Language: en Keywords: ts, tt\_news, markers, extend tt\_news Copyright 2000-2008, Georg Ringer, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.org .. _Table-of-Contents: Table of Contents ----------------- `Generic marrkers for tt\_news 1 <#1.Generic%20marrkers%20for%20tt_news|outline>`_ **`Introduction 3 <#1.1.Introduction|outline>`_** `What does it do? 3 <#1.1.1.What%20does%20it%20do_|outline>`_ `Screenshots 3 <#1.1.2.Screenshots|outline>`_ **`Users manual 4 <#1.2.Users%20manual|outline>`_** **`Configuration for TS inside a news record 5 <#1.3.Configuration%20f or%20TS%20inside%20a%20news%20record|outline>`_** `Simple examples 5 <#1.3.1.Simple%20examples|outline>`_ `Advanced examples 5 <#1.3.2.Advanced%20examples|outline>`_ `More ideas 6 <#1.3.3.More%20ideas|outline>`_ **`Configuration for global TS markers 7 <#1.4.Configuration%20for%20global%20TS%20markers|outline>`_** `Simple examples 7 <#1.4.1.Simple%20examples|outline>`_ **`You like the extension? 8 <#1.5.You%20like%20the%20extension_|outline>`_** **`To-Do list 9 <#1.6.To-Do%20list|outline>`_** **`ChangeLog 10 <#1.7.ChangeLog|outline>`_** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension makes it possible to use any possible TS construct you like inside the tt\_news extension. You need a tip-a-friend-link or want to include any other extension, or need to extend tt\_news in any other way. Take a look at the examples! .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-3| **Image 1: A possible example** .. _Users-manual: Users manual ------------ This extension is for administrators only because you need access to your TS configuration! To use the extension just follow this steps Install tt\_news & ttnewsgenericmarkers If you are not familiar with tt\_news, please take a look at the manual of `tt\_news `_ ! Set up tt\_news if you haven't done this already Take a look at the next chapter to get to know the syntax. Modify the template of tt\_news accordingly to the next chapter. You are done! **This extensions lets you include any and everything you can do with TypoScript.** **Therefore TS knowledge is essential!** .. _Configuration-for-TS-inside-a-news-record: Configuration for TS inside a news record ----------------------------------------- By filling the array plugin.tt\_news.genericmarkers you can create as many cObjects as you like for a news record in SINGLE, LIST or LATEST view. Take a look at the following examples. .. _Simple-examples: Simple examples ^^^^^^^^^^^^^^^ **Output of a link** Create the following TS :: plugin.tt_news.genericmarkers { link = TEXT link { value = Important link typolink.parameter = www.typo3.org } } Create a marker called ###GENERIC\_LINK### inside any of the possible views of tt\_news (list, single, ...) and clear the cache. Now you should see a link to typo3.org instead of the marker in the Frontend (maybe you need to clear the cache). **Output of your username** Create the following TS :: plugin.tt_news.genericmarkers { username = TEXT username.data = TSFE:fe_users|username } Create a marker called ###GENERIC\_USERNAME### inside any of the possible views of tt\_news (list, single, ...) to get the username of the current logged in user. **Different TS for different views** Of course you can set a different TS for differernt views by using a code like this :: plugin.tt_news.genericmarkers { SINGLE { test = TEXT test.value = abc } test = TEXT test.value = def } The output at the marker ###GENERIC\_TEST### will be “abc” at the single view and “def” in all others. .. _Advanced-examples: Advanced examples ^^^^^^^^^^^^^^^^^ You need a bit more knowledge about TS to follow those. **Use data of the current tt\_news record** It is possible to use any data of the tt\_news record by setting :: plugin.tt_news.genericmarkers.data = title,uid Now you are able to use the values of the fields title and uid like that :: plugin.tt_news.genericmarkers { data = title title2 = TEXT title2 { field = generic_title wrap = Title again: | } } So if you need another field, just use the kickstarter to extend tt\_news and use this way to output your new data. **Tip-A-Friend-Link** Use the next example to create a link for a tip-a-friend-extension by TS only. :: plugin.tt_news.genericmarkers { tip = TEXT tip { value = Send this page to a friend typolink.parameter = 10778 typolink.additionalParams.cObject = COA typolink.additionalParams.cObject { # rawUrlEncoded link 10 = COA 10 { 10 = TEXT 10.data = TSFE:baseUrl # including all parameters from the query string. 20 = TEXT 20.typolink.parameter.data = page:uid 20.typolink.addQueryString = 1 20.typolink.addQueryString.exclude = id,tipUrl 20.typolink.returnLast = url # rawurlencode to use url as one parameter stdWrap.rawUrlEncode = 1 } wrap = &tipUrl=| } wrap = => | } } The marker needs to be named ###GENERIC\_TIP###. .. _More-ideas: More ideas ^^^^^^^^^^ - Add an extra menu by using the cObj HMENU - Add some extra records by using CONTENT or RECORDS - Include an extension by using USER or USER\_INT .. _Configuration-for-global-TS-markers: Configuration for global TS markers ----------------------------------- By filling the array plugin.tt\_news.globalmarkers you can create as many cObjects as you like for the global news template (=outside of the repeating news record itself). Take a look at the following examples. .. _Simple-examples: Simple examples ^^^^^^^^^^^^^^^ **Output of a copyright information** This examples creates a simple text before or after the news records. Create the following TS :: plugin.tt_news.globalmarkers { info = TEXT info { value ( Important information!
Everything is protected by law, don't copy it to your website ) } } The marker needs to be named ###GLOBAL\_INFO### and is placed before or after the subpart **Create some links to another page** This examples creates some simple links to other pages Create the following TS :: plugin.tt_news.globalmarkers { links = COA links { wrap = 10 = TEXT 10 { value = More records in the archive typolink.parameter = 123 wrap =
  • |
  • } 20 <.10 20 { value = Complains? Send a mail! typolink.parameter = author@newsrecord.org } } } The marker needs to be named ###GLOBAL\_LINKS###. .. _You-like-the-extension: You like the extension? ----------------------- I didn't have much work with this extension but it should be still honored. So if you like this extension, you can do one or more of the following things: - Write me a mail or create a posting at `http://www.rggooglemap.com/dev/ttnewsgenericmarkers.html `_ . - Please rate the extension in the Repository: `http://typo3.org/extensions/ `_ search for `ttnewsgenericmarkers `_ , click on the title and then at “Ratings” (You need to be registered and logged in at typo3.org) One of those things is the least you can do for getting all those great extensions completely for free! .. _To-Do-list: To-Do list ---------- Add some more examples .. _ChangeLog: ChangeLog --------- - 1.0.0 Initial Release - 1.1.0 Some cleanup, adding the global hooks, thanks Luis Flávio Seelig 10 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 266 .. :id: Grafik1 .. :name: Grafik1 .. :width: 418