[TYPO3-english] adding new field to pages table and display value
Éric Thibault
Eric.Thibault at dc.ulaval.ca
Wed Jun 27 16:47:49 CEST 2012
Hello again to all!
I've managed to come closer to a solution but... here are my current bugs:
1. I can insert the tx_addurltranslation_urltranslation value in the "value" but not in the "typolink.parameter"
2. I only want the speaking url but I only get the full link with the "a" tag!
Here is my code:
page.headerData.16 = TEXT
page.headerData.16 {
insertData=1
wrap = <script type='text/javascript'>var urlTranslation = '|'; </script>
value =
typolink.parameter = 18661
#{field:tx_addurltranslation_urltranslation}
typolink.returnLast = "url"
}
Here is my generated header:
<script type='text/javascript'>var urlTranslation = '<a href="avenir-2010.html" >avenir_2010</a>'; </script>
Thank you all for your patience!
Eric Thibault
-----Message d'origine-----
De : Éric Thibault
Envoyé : 27 juin 2012 08:43
À : 'typo3-english at lists.typo3.org'
Objet : adding new field to pages table and display value
Hello to all!
I want to add a new field 'urlTranslation' to the "Pages" form and display it in page header... I've created a new extension and added successfully my new field and it shows OK in the "Pages" form (page properties) in the "extended" tab.
But now that my new field is available, how can I show its value on a page? I would like its value to appear in the page header like this:
<script type="text/javascript">
var urlTranslation = "the realurl URL equivalent (if possible...)"; </script>
I use Templavoila...
When I modify a page, I get that data structure (small subset here...)
T3lib_TCEmain Object
[datamap]
[pages]
[7]
[tx_addurltranslation_urltranslation] => 2482 (id of a page)
Thanks a million times!
Eric Thibault
More information about the TYPO3-english
mailing list