blog.Resource

Archive:

News-Feeds:


RSS 2.0
RSS 0.91
RDF
ATOM 0.3
December 21, 2009

TYPO3 4.3 Treasure Chest

Category: Steffen Kamper, TYPO3, Core

By: Steffen Kamper

There are some tiny features that might be hidden. Let's have a look to 2 tiny but very useful treasures ;)

Default Get Vars

You may know the problem: You have a page with a plugin, but the plugin need a GETvar to display content, a call without the parameter shows empty page.

There was no way to define this before. Some plugins have a _DEFAULT_GET_VARS parameter which can be defined. Now we have a global one:

[page.]config.defaultGetVars {...}

Example I

You have a multilingual page, and all pages show default language (L=0) when L is missing. Now force one page to show dutch as default (L=2). Use ext-template on this page and use:

config.defaultGetVars {
   L = 2
}

Example II

You have a page with news single view. Without the record-id in Url you get error message.
The news you want to display by default is id 25, so url would be
&tx_ttnews[tt_news]=25
As the Getvar is an array you write it in normal TS syntax using dots:

config.defaultGetVars {
   tx_ttnews.tt_news = 25
   tx_ttnews.backPid = 2
}

 

 

Open page link in Popup

You all know how to make a typolink for open in Popup. Also Links generated in RTE have this option.

But how to open a page link generated in a normal Menu as Popup?
Now this is really simple, open the page properties of the page you want to open in Popup. use the target field for configure the Popup.

Examples

400x200  opens Page in Popup size 400x200

600x400:rezizable=0,location=1  opens Page in Popup size 600x400 with additional Parameters

100 300x200  opens Page in Popup 300x200 with Pagetype 100 (&type=100)

2 _blank  opens Page in new window  with Pagetype 2 (&type=2)

You can read this also in the CSH help of the target field.

I hope you enjoy these features.


comments

comment #1
Gravatar: michael fritz michael fritz December 21, 2009 23:38
Coo, that's powerfull and easy to use..

comment #2
Gravatar: sebastian fischer sebastian fischer December 22, 2009 07:08
The first one is realy nice to have, but the second is surprising. Cool to have that now.

comment #3
Gravatar: maddesigns maddesigns December 22, 2009 07:08
the direct news article links are great! thanks for this feature!

comment #4
Gravatar: We Love TYPO3 We Love TYPO3 December 22, 2009 08:38
Thanks for these tiny yet valuable bits.

NB: There's a typo in the popup samples: "600x400:reziable" should rather read "600x400:resizable"

comment #5
Gravatar: Steffen Kamper Steffen Kamper December 22, 2009 09:52
thanks, i fixed that.

comment #6
Gravatar: SEO-Sys SEO-Sys December 30, 2009 13:10
Ha, sometimes problems areeasy to solve while you usualy try to explain the customer, that things are not easy to do ;-) Thank you for the hints - will avoid much discussions.

comment #7
Gravatar: xt-commerce-tricks.de xt-commerce-tricks.de January 12, 2010 22:17
This saved my a lot of time, great thx :D

Sorry, comments are closed for this post.