[TYPO3-mvc] using new fields from tt_address in extbase

Claus Due claus at wildside.dk
Thu Sep 22 17:06:01 CEST 2011


Hi Johannes,

This is incorrect:

      public function getLon(){
            return $this->tt_address_hook_lng;
      }

Should be:

      public function getLon(){
            return $this->ttAddressHookLng;
      }

Also, make sure you use "Lon" or "Lng" consistently, or reflection/getters/setters will not work...

Hope this is it :)

Cheers,
Claus

On Sep 22, 2011, at 4:59 PM, Johannes C. Schulz - EnzephaloN IT-Solutions wrote:

> Hi Claus
> 
> Yes I did.
> I found some errors with naming of variables. 
> In model the variable has to be called "protected $ttAddressHookLat;".
> Now print_r shows me the correct data. But fluid didn't show it:
> {hotellist.address.ttAddressHookLng} . I also tried
> {hotellist.address.tt_address_hook_lng}
> 
> Best regards
> Johannes
> 
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
> Claus Due
> Gesendet: Donnerstag, 22. September 2011 16:39
> An: TYPO3 v4 MVC project
> Betreff: Re: [TYPO3-mvc] using new fields from tt_address in extbase
> 
> Hi Johannes,
> 
> Did you also add the fields to "showitem" for the tt_address table?
> 
> Cheers,
> Claus
> 
> On Sep 22, 2011, at 4:17 PM, Johannes C. Schulz - EnzephaloN IT-Solutions
> wrote:
> 
>> Hello together!
>> 
>> I've a little problem with my new fields in tt_address. I called them 
>> tt_address_hook_lat and tt_address_hook_lng.
>> 
>> In my Extension I wrote a model (Tx_Enzhotellist_Domain_Model_Address) 
>> with all fields I need.
>> for example:
>> [.]
>>      /**
>>      * Getter for Longitude
>>      *
>>      * @return float Lon
>>      */
>>      public function getLon(){
>>            return $this->tt_address_hook_lng;
>>      }
>> [.]
>> 
>> In setup.txt I mapped the foreign table to persistence settings.
>> 
>> Also the TCA is written like:
>> 
>> [.]
>> 'tt_address_hook_lat' => array (
>>                   'exclude' => 1,
>>                   'label'   => 'Latitude',
>>                   'config'  => array (
>>                          'type' => 'input',
>>                          'size' => '20',
>>                          'eval' => 'trim',
>>                          'max'  => '30'
>>                   )
>>            ),
>> [.]
>> 
>> 
>> 
>> In fluid all other fields from tt_address are shown, but not the two new!
>> 
>> 
>> 
>> Any ideas?
>> 
>> Best regards
>> 
>> Johannes
>> 
>> 
>> 
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
>> vc
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> 
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list