Reusing typoscript with help of a extension

 / Main / Articles / Reusing typoscript with help of a extension

After i have looket at host.sonspring.com/hoverbox/ (thanks to a forumpost ) i decidet to implement this as a example.

With this small extension i would like to show how to write typoscript code into a extension to reuse it for other projects.

 

 

I have used the kickstarter for this.

 

What i did:

1. Installed the Kickstatrter and selected in the Extension Manager "Create new extension"

2. Written all the details into "General Info" and choosed a unique extension name.

3. Inserted the title and the typoscript setup/ constants in "static TypoScript code ".

After installing the extension you can choose to include the typoscript when editing the template record in "Include static (from extensions):".

 

For my sample i used following typoscript code:

 

Constants:

 

styles.content.imgtext.colSpace = 5
styles.content.imgtext.rowSpace = 5
styles.content.imgtext.borderColor = #CCCCCC
styles.content.imgtext.borderThick = 1
styles.content.imgtext.borderSpace = 8

 

 

Setup:

 

tt_content.image.20.border>
tt_content.image.20.border=1
tt_content.image.20.1.imageLinkWrap =0
tt_content.image.20.1.imageLinkWrap>
tt_content.image.20.1.stdWrap.innerWrap(
  <a href="#"><img src="{current:1}" class="preview" />|</a>
)
tt_content.image.20.1.stdWrap.innerWrap.insertData=1
page.headerData.54=TEXT
page.headerData.54.insertData=1
page.headerData.54.data(
  PATH:EXT:t3w_hoverbox/static/Images_Text_with_image_Hoverbox/style.css
)
page.headerData.54.wrap=<link rel="stylesheet" type="text/css" href="|" />

page.headerData.55=TEXT
page.headerData.55.insertData=1
page.headerData.55.data(
   PATH:EXT:t3w_hoverbox/static/Images_Text_with_image_Hoverbox/ie.css
)
page.headerData.55.wrap(
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="|" />
<![endif]-->
}

 

 

Download t3x

Example Hoverbox



Comments


Stan, 29-03-07 18:05:
Is it possible to set a maximun size for the images?
It is a great extension, but most of the images are uploaded in different content areas and are all random sizes that I set in the content area, so now they (on hover) are too big.

Great work.
ionut, 23-05-07 13:56:
Great, thank you, I was looking for something like this.
I will use it :)
the, 23-08-07 11:57:
läuft wohl was nicht rund. gibt es ein update?
Maik, 15-08-08 13:52:
The example hoverboxes don't work in Firefox 1.5 and IE7 (Javascript is on).
Mccade, 03-07-11 16:22:
It was dark when I woke. This is a ray of ssuinhne.

Add comment

* - required field

*



*
*

Top 10 Updates

Useful Links geändert am  24-Apr-2013 06:31:20
Nice fonts using Google font API geändert am  20-May-2010 14:36:47
TS-based Searchbox for Indexed Search  geändert am  18-May-2010 16:27:15
TYPO3 SEO geändert am  30-Apr-2010 07:44:22
Search engine friendly graphical headers in TYPO3 geändert am  30-Apr-2010 07:33:44
Creating a simple Infocenter using TYPO3 geändert am  17-Nov-2009 11:12:52
Making the Section Menu work correctly with TemplaVoila geändert am  05-May-2009 10:27:17
Show pages with type "Not in Menu" in a sitemap geändert am  05-May-2009 10:11:17
Implementation of the DHTML menu from brainjar.com  geändert am  01-Feb-2009 13:02:48
Sample DHTML menu geändert am  01-Feb-2009 12:51:25

Latest comments

17-May-2013 10:09:34
Nicolas schrieb: If an extension or orther return a content empty, this solution not working. I not have the...
Wrap only if not empty
22-Apr-2013 12:08:26
morkel schrieb: hi i am new on typ03 and want to open a form on lightbox. when we click on image their a form will...
Using lightbox without extension
04-Mar-2013 13:33:47
Sebastian schrieb: Vergesse das immer wieder. Vielen Dank an dich und an Google :)
Wrap only if not empty
Deutsch
Search: