[TYPO3] Noob Question: Removing Default Image Field Link?

James Calhoun James.Calhoun at secude.com
Thu Apr 17 13:23:10 CEST 2008


Hi All,

 

I have seen a few questions like this, but the answers didn't work out
for me. I have tried a number of things, so maybe someone can help.

 

I have an image field that I mapped, and then edited the DS according to
this info from the Typo3 wiki:

 

Adding alt and title tags to images and allow image linking and scaling
via width - height fields

This can be easily achieved because you can access all fields defined in
the DS with TypoScript. If you replace the image definition inside the
DS after mapping an image field with the following code, you will be
able to add a titletext, alttext, an image link and values for
image-width and height and the image will be rendered accordingly. 

 

So my new DS looks is pasted below.

 

Ive tried things like:

-Removing "10.stdWrap.typolink.parameter.field = field_link]]>" from the
CDATA in field image

-Removing "10.typolink.typolink.parameter.field = field_link]]>" from
the CDATA in field_link

-Removing Both?!

-Changing "10.typolink.typolink.parameter.field = field_link]]>" to
""10.stdWrap.typolink.parameter.field = field_link]]>" in the CDATA in
field_link, just cuz it looked better

 

 

No matter what I do, when I select an image in my Image Field, it just
adds a link to that image itself, and no other links.

 

On a side note, when I select the image, it always appears to make a
copy of it adding "_0" to the name. Why cant it just link to the image I
have?

 

Any suggestions?

 

Thanks,

 

James

 

 

 

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>

<T3DataStructure>

                <meta type="array">

                                <langDisable>1</langDisable>

                </meta>

                <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_menu1
type="array">

 
<tx_templavoila type="array">

 
<title>Main Menu</title>

 
<description>Map to DIV surrounding Main Menu</description>

 
<sample_data type="array">

 
<numIndex index="0">[Dynamic Menu]</numIndex>

 
</sample_data>

 
<eType>TypoScriptObject</eType>

 
<tags>*:inner</tags>

 
<TypoScriptObjPath>lib.menu_1</TypoScriptObjPath>

 
</tx_templavoila>

                                                </field_menu1>

                                                <field_pagecontent
type="array">

 
<tx_templavoila type="array">

 
<title>Page Content</title>

 
<description>Map to main DIV for Page Content</description>

 
<sample_data type="array">

 
<numIndex index="0">[Dynamic Page Content]</numIndex>

 
</sample_data>

 
<eType>rte</eType>

 
<TypoScript><![CDATA[

                10 = TEXT

                10.current = 1

                10.parseFunc = < lib.parseFunc_RTE

 
]]></TypoScript>

 
<proc type="array">

 
<HSC type="integer">0</HSC>

 
</proc>

 
</tx_templavoila>

 
<TCEforms type="array">

 
<config type="array">

 
<type>text</type>

 
<cols>48</cols>

 
<rows>5</rows>

 
<softref>typolink_tag,images,email[subst],url</softref>

 
</config>

 
<defaultExtras>richtext:rte_transform[flag=rte_enabled|mode=ts_css]</def
aultExtras>

 
<label>Page Content</label>

 
</TCEforms>

                                                </field_pagecontent>

                                                <field_address
type="array">

 
<tx_templavoila type="array">

 
<title>Header - Address</title>

 
<description>Map to DIV containing address</description>

 
<sample_data type="array">

 
<numIndex index="0">[Some Address Here]</numIndex>

 
</sample_data>

 
<eType>input</eType>

 
<proc type="array">

 
<HSC type="integer">1</HSC>

 
</proc>

 
</tx_templavoila>

 
<TCEforms type="array">

 
<config type="array">

 
<type>input</type>

 
<size>48</size>

 
<eval>trim</eval>

 
</config>

 
<label>Header - Address</label>

 
</TCEforms>

                                                </field_address>

                                                <field_copyright
type="array">

 
<tx_templavoila type="array">

 
<title>Header - Copyright</title>

 
<description>Map to DIV Containing Copyright</description>

 
<sample_data type="array">

 
<numIndex index="0">[Copyright 2008]</numIndex>

 
</sample_data>

 
<eType>input</eType>

 
<proc type="array">

 
<HSC type="integer">1</HSC>

 
</proc>

 
</tx_templavoila>

 
<TCEforms type="array">

 
<config type="array">

 
<type>input</type>

 
<size>48</size>

 
<eval>trim</eval>

 
</config>

 
<label>Header - Copyright</label>

 
</TCEforms>

                                                </field_copyright>

            <field_image type="array">

                <tx_templavoila type="array">

                    <title>Header - Logo</title>

                    <sample_data type="array">

                        <numIndex index="0"></numIndex>

                    </sample_data>

                    <eType>image</eType>

                    <TypoScript><![CDATA[

                      10 = IMAGE

                      10.altText.field = field_alttext

                      10.titleText.field = field_titletext

                      10.file.import = uploads/tx_templavoila/

                      10.file.import.current = 1

                      10.file.import.listNum = 0

                      10.file.width.field = field_imagewidth

                      10.file.height.field = field_imageheight

                      10.stdWrap.typolink.parameter.field =
field_link]]>

                            </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>Header - Logo</label>

                </TCEforms>

            </field_image>

            <field_link type="array">

                <type>attr</type>

                <tx_templavoila type="array">

                    <title>linktext</title>

                    <sample_data type="array">

                        <numIndex index="0"></numIndex>

                    </sample_data>

                    <eType>link</eType>

                    <TypoScript><![CDATA[

                      10 = TEXT

                      10.typolink.typolink.parameter.field =
field_link]]>

                    </TypoScript>

                    <proc type="array">

                        <HSC type="integer">1</HSC>

                    </proc>

                </tx_templavoila>

                <TCEforms type="array">

                    <config type="array">

                        <type>input</type>

                        <size>15</size>

                        <max>256</max>

                        <checkbox></checkbox>

                        <eval>trim</eval>

                        <wizards type="array">

                            <_PADDING type="integer">2</_PADDING>

                            <link type="array">

                                <type>popup</type>

                                <title>Link</title>

                                <icon>link_popup.gif</icon>

 
<script>browse_links.php?mode=wizard</script>

 
<JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSop
enParams>

                            </link>

                        </wizards>

                    </config>

                    <label>image link</label>

                </TCEforms>

            </field_link>

            <field_imageheight type="array">

                <tx_templavoila type="array">

                    <title>height</title>

                    <sample_data type="array">

                        <numIndex index="0"></numIndex>

                    </sample_data>

                    <eType>input</eType>

                    <proc type="array">

                        <HSC type="integer">1</HSC>

                    </proc>

                </tx_templavoila>

                <TCEforms type="array">

                    <config type="array">

                        <type>input</type>

                        <size>4</size>

                        <eval>int</eval>

                        <checkbox>0</checkbox>

                        <range type="array">

                          <upper>400</upper>

                          <lower>0</lower>

                        </range>

                        <default>0</default>

                    </config>

                    <label>height</label>

                </TCEforms>

            </field_imageheight>

            <field_imagewidth type="array">

                <tx_templavoila type="array">

                    <title>width</title>

                    <sample_data type="array">

                        <numIndex index="0"></numIndex>

                    </sample_data>

                    <eType>input</eType>

                    <proc type="array">

                        <HSC type="integer">1</HSC>

                    </proc>

                </tx_templavoila>

                <TCEforms type="array">

                    <config type="array">

                        <type>input</type>

                        <size>4</size>

                        <eval>int</eval>

                        <checkbox>0</checkbox>

                        <range type="array">

                          <upper>600</upper>

                          <lower>0</lower>

                        </range>

                        <default>0</default>

                    </config>

                    <label>width</label>

                </TCEforms>

            </field_imagewidth>

                                </el>

                </ROOT>

</T3DataStructure>

________________________

James Calhoun
email: james.calhoun at secude.com <mailto:james.calhoun at secude.com> 
skype: james_calhoun
aim: james.calhoun at gmail.com
www.secude.com

 

 



More information about the TYPO3-english mailing list