DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
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 |
Generic marrkers for tt_news - ttnewsgenericmarkers
Generic marrkers for tt_news¶
Extension Key: ttnewsgenericmarkers
Language: en
Keywords: ts, tt_news, markers, extend tt_news
Copyright 2000-2008, Georg Ringer, <www.ringer.it>
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¶
Generic marrkers for tt_news 1
`Introduction 3 <#1.1.Introduction|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>`_
`Configuration for global TS markers 7 <#1.4.Configuration%20for%20global%20TS%20markers|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¶
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¶
Image 1: A possible example
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¶
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¶
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¶
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¶
- 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¶
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¶
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 (
<strong>Important information!</strong><br />
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 <!-- ###CONTENT### -->
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 = <ul>|</ul>
10 = TEXT
10 {
value = More records in the archive
typolink.parameter = 123
wrap = <li>|</li>
}
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?¶
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¶
Add some more examples
ChangeLog¶
- 1.0.0 Initial Release
- 1.1.0 Some cleanup, adding the global hooks, thanks Luis Flávio Seelig
10