Jump to content

Why does that field appear two times ?

Featured Replies

Posted

Hello,

I have created two fields, for a database, in Pages. One is "content", the other is "Bibliography".
I use my own template.
And I don't understand why does the field Bibliography appear two times : a first time above the content (that's the problem) and a second time below the content (that's ok).

Here is my code, in pages-> template->records

<section class="ipsType_richText ipsType_normal" data-controller='core.front.core.lightboxedImages'>
    <!-- zone de contenu -->

  {$record->customFieldDisplayByKey('contenu')|raw}         
  {$record->customFieldDisplayByKey('bibliographie')|raw}      
          
    <!-- fin de la zone de contenu -->
          </section>

You can see the problem here : http://www.dictionnairecomino.com/dictionnaire.php/sciences/mathematiques/autonomie-r3/

 

Regards

  • Author

Well, it works, if I desactivate those lines :

<!-- 
{{foreach $record->customFieldsForDisplay('display') as $fieldId => $fieldValue}}
				{{if $fieldValue}}
					{$fieldValue|raw}
				{{endif}}
			{{endforeach}} 
-->

But that template is not easy to understand.

If you manually add the field to the template, you need to turn off its automatic display. That can be done in the field settings for the listing and display view individually.

  • Author

Yes, this is what I had in mind, thank you dear Opentype :)

 

Some comments in the templates would be a great gain of time. Something like that :

 

<!-- this part displays the title -->

<!-- end of the title part -->

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.