Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.3. Configuration

This extensions lets you include any and everything you can do with TypoScript. Therefore TS knowledge is essential!

By filling the array plugin.tt_news.genericmarkers you can create as many cObjects as you like.

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

  1. Add an extra menu by using the cObj HMENU

  2. Add some extra records by using CONTENT or RECORDS

  3. Include an extension by using USER or USER_INT