Results 1 to 3 of 3

Thread: Select attribute displays "Array" instead of the data in a personalised FE template

  1. #1
    User
    Join Date
    04-01-10.
    Posts
    289

    Beitrag Select attribute displays "Array" instead of the data in a personalised FE template

    Hi everyone,

    Looks like MM still have some secrets for me ;-))

    Here you can see the FE page where the problem is : http://demo.lestock.net/lnhv3/en-res...ctor-hugo.html
    In the #main column : "Dimanche 04 décembre 2016 - Array - 19:00". "Array" comes from a select attribute from mm_lieux (="mm_places") but should display the name of the place.

    In my personalised template I used line 13 :
    PHP Code:
    <?php echo $arrRencontre[$this->getFormat()]['lieuRencontre']; ?>
    where lieuRencontre is my select attribute.

    Here is the entire template code:
    PHP Code:
    <?php $strRendersettings = isset($this->settings)? 'settings' 'view'?><?php if (count($this->data)): ?>
        <div class="layout_full">
            <?php foreach ($this->data as $arrRencontre): ?>
            <div class="itemRencontre">            
               <h2 class="intitule"><?php echo $arrRencontre['text']['intitule']; ?></h2>            
               <p class="soustitre"><?php echo $arrRencontre['text']['soustitre_rencontre']; ?></p>            
               <p class="description"><?php echo $arrRencontre[$this->getFormat()]['description']; ?></p>            
               <p class="tarif"><?php echo $arrRencontre[$this->getFormat()]['tarif']; ?></p> 
      
         // MY PROBLEM is between here
               <p class="horaire"><?php echo $arrRencontre[$this->getFormat()]['date_rencontre']; ?> - 
              <?php echo $arrRencontre[$this->getFormat()]['lieuRencontre']; ?> // EXACTLY HERE
              - <?php echo $arrRencontre[$this->getFormat()]['heure_rencontre']; ?></p>
         / and here       


                 <div class="liste_intervenants">            
                <?php if(!empty($arrRencontre['raw']['intervenant1'])): ?>            
    <div class="intervenant"><?php echo $arrRencontre[$this->getFormat()]['photoInter1']; ?><?php echo $arrRencontre[$this->getFormat()]['intervenant1']; ?></div>
                 <?php endif; ?>
                <?php if(!empty($arrRencontre['raw']['intervenant2'])): ?>
    <div class="intervenant"><?php echo $arrRencontre[$this->getFormat()]['photoInter2']; ?><?php echo $arrRencontre[$this->getFormat()]['intervenant2']; ?></div>            
                 <?php endif; ?>            
                 <?php if(!empty($arrRencontre['raw']['intervenant3'])): ?>            
                 <div class="intervenant"><?php echo $arrRencontre[$this->getFormat()]['photoInter3']; ?><?php echo $arrRencontre[$this->getFormat()]['intervenant3']; ?></div>
                 <?php endif; ?>            
                 <?php if(!empty($arrRencontre['raw']['intervenant4'])): ?>            
                 <div class="intervenant"><?php echo $arrRencontre[$this->getFormat()]['photoInter4']; ?><?php echo $arrRencontre[$this->getFormat()]['intervenant4']; ?></div>            
                  <?php endif; ?>            
                  <?php if(!empty($arrRencontre['raw']['intervenant5'])): ?><div class="intervenant"><?php echo $arrRencontre[$this->getFormat()]['photoInter5']; ?><?php echo $arrRencontre[$this->getFormat()]['intervenant5']; ?></div>            
                  <?php endif; ?>            
                 </div>
           </div>        
    <?php endforeach; ?>        
    </div> <!-- fin layout_full" -->
    <?php else: ?><p class="info"><?php echo $this->noItemsMsg?></p><?php endif; ?>
    Question 1 : What is the right syntax or what do I miss ?

    Question 2 : where can I find doc about what syntax to use in templates ?

    Thanks
    Last edited by charled; 03/19/2016 at 01:41. Reason: [solved]

  2. #2
    User
    Join Date
    04-01-10.
    Posts
    289

    Default [solved]

    Very strange !! It's now working since 5 minutes and I don't know why…

    After trying many things and coming back to my initial code, its now working as I was expected after adding a custom ce_attribute_select_xx template to the attribute in the FE output rendersettings. And it's still working without…

  3. #3
    User zonky's Avatar
    Join Date
    11-29-11.
    Location
    Berlin
    Posts
    159

    Default

    Quote Originally Posted by charled View Post
    Question 2 : where can I find doc about what syntax to use in templates ?
    you can debug your template e.g. like http://metamodels.readthedocs.org/de...templates.html

    now, we start to write tha manual in english :-)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •