[TYPO3-english] IMG_RESOURCE from RECORDS within CSS (seminars extension)
Christopher Torgalson
bedlamhotel at gmail.com
Wed Oct 20 16:57:46 CEST 2010
Hi there,
On Wed, Oct 20, 2010 at 7:40 AM, Janosch Skrobek <janosch at bworx.de> wrote:
> Hi everyone,
>
> I am trying to create a gifbuilder image for my seminars title. Since I can
> not get into the extension itself via typoscript I have come up with a
> different approach:
>
> lib.test1=COA
> lib.test1{
> wrap=|
> 5=RECORDS
> 5 {
> source = {GPvar:tx_seminars_pi1|showUid}
> source.insertData = 1
> tables = tx_seminars_seminars
> conf.tx_seminars_seminars >
> conf.tx_seminars_seminars = IMG_RESOURCE
> conf.tx_seminars_seminars {
> file = GIFBUILDER
> file {
> XY = 670,[10.h]+[20.h]+[30.h]+23
> backColor = #ffffff
> transparentColor = #ffffff
> transparentColor.closest = 1
> 10 = TEXT
> 10.text.field = title
> 10.fontFile = fileadmin/templates/fonts/EgoCom.ttf
> 10.offset = 0,[10.h]
> 10.fontSize = 30
> }
> }
> }
> }
>
> This works and outputs the correct path to my image-file that is being
> created from the title. Since I have no means of putting the image into the
> seminars template I thought of using the path within a newly generated
> stylesheet:
>
> dynamicStylesheet = PAGE
> dynamicStylesheet {
> typeNum = 79
> config {
> disableAllHeaderCode = 1
> additionalHeaders = Content-type: text/css
> admPanel = 0
> }
> 10 < lib.test1
> 10.stdWrap.wrap (
> h1.seminars {
> background-image: url(|);
> }
> )
> }
>
> While the 10.stdWrap gets output in my stylesheet the 10 < lib.test1
> delivers nothing (completely empty).
>
> Anyone with a hint on how to get the output that I can see when using it as
> content into my stylesheet?
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
Well, if you just need a nonstandard web font in the titles, I'd
encourage you to use CSS instead [1], [2]. It's quite a bit easier and
generally a better solution than TS-generated images.
However, if you do need an actual generated image for one reason or
another, I wrote an extension a couple of years ago that provides a
bunch of default Typoscript to do exactly what you're attempting
(including a manual) [3].
[1] The first paragraph gives a nice overview of what's currently
available: http://www.alistapart.com/articles/fonts-at-the-crossing/
[2] http://code.google.com/webfonts
[3] http://typo3.org/extensions/repository/view/bh_firtools/current/
--
Christopher Torgalson
http://www.typo3apprentice.com/
More information about the TYPO3-english
mailing list