[TYPO3-templavoila] Selecting a image as reference from DAM or File in TV ?
Tom Walter
t3 at wnets.de
Thu Aug 31 22:40:35 CEST 2006
Dmitry Dulepov wrote:
>> But since I use copies at the moment anyway I am wondering how I could
>> get just the name of an FCE-image-Element in Typoscript (and than wrap it
>> with the rest of my code) ?
> This way you get background image for DIV with your selected image. Is
> this what you are trying to do?
yes that's it. I played a bit around and came to the following DS.xml (see
below this text). There is a nice feature that I can set one Element not to
be wrapped and another Element not to be seen in the BE. I am not sure if I
did it too complicated (just let me know), but it works somehow.
But as a German perfectionist I still got two questions:
1.) Am I right, that I could change the upload-folder for this DS from
uploads/tx_templavoila/ to something like uploads/background_images - or is
there any problem in setting a special directory for that ?
2.) Still on the issue of reference vs. copy of an image.
In my case I will get maybe around 10 images used on 100plus pages. So at
the end I get all kinds of copies of the same image in my folder.
Is there a way in Typo3 to avoid that the counter is added to the filename ?
I thought I read once about it, but I am not even sure if it was about
Typo3 or another CMS I am using a lot ...
example listing:
Jul 26 01:17 beispiel660x420.jpg
Jul 26 01:32 beispiel660x420_01.jpg
Aug 18 18:57 beispiel660x420_02.jpg
Aug 20 23:42 beispiel660x420_03.jpg
Aug 21 00:04 beispiel660x420_04.jpg
Aug 21 00:17 beispiel660x420_05.jpg
Aug 23 23:34 beispiel660x420_06.jpg
Aug 29 05:31 beispiel660x420_07.jpg
Aug 29 05:35 beispiel660x420_08.jpg
Aug 29 05:56 beispiel660x420_09.jpg
Thanks, Dmitry for your faithfull work with templavoila and in this
newsgroup !!!
I am learning in order to help you soon (in answering questions here and
maybe providing patches in the future ...)
Tom
################## here starts the xml: ############################
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<T3DataStructure>
<ROOT type="array">
<tx_templavoila type="array">
<title>ROOT</title>
<description>Select the HTML element on the page which you want to be the
overall container element for the template.</description>
</tx_templavoila>
<type>array</type>
<el type="array">
<field_image_url type="array">
<type>no_map</type>
<tx_templavoila type="array">
<title>Bild URL</title>
<sample_data type="array">
<numIndex index="0"></numIndex>
</sample_data>
<eType>image</eType>
<TypoScript><![CDATA[
10 = IMG_RESOURCE
10.file.import = uploads/tx_templavoila/
10.file.import.current = 1
10.file.import.listNum = 0
]]></TypoScript>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>group</type>
<internal_type>file</internal_type>
<allowed>gif,png,jpg,jpeg</allowed>
<max_size>1000</max_size>
<uploadfolder>uploads/tx_templavoila</uploadfolder>
<show_thumbs>1</show_thumbs>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
</config>
<label>Bild URL</label>
</TCEforms>
</field_image_url>
<field_image_dummy type="array">
<tx_templavoila type="array">
<title>Dummy</title>
<sample_data type="array">
<numIndex index="0"></numIndex>
</sample_data>
<eType>none</eType>
<TypoScript><![CDATA[
10 = TEXT
10.value = <div id="hintergrundbild" style="position:absolute; top:0px;
left:0px; width:965px; height:600px; background-repeat:no-repeat;
background-attachment:scroll; background-position:top left;
20 = TEXT
20.field = field_image_url
20.wrap = background-image:url(/uploads/tx_templavoila/|);
30 = TEXT
30.value = z-index:20;"></div>
]]></TypoScript>
</tx_templavoila>
</field_image_dummy>
</el>
</ROOT>
</T3DataStructure>
More information about the TYPO3-project-templavoila
mailing list