Basic (and reversed) not type - Header/Extra fields

I have customized the note type Basic (and reversed) by adding Extra and Header fields.

Is there a way to set the Header field to always and exclusively appear associated with {{FrontSide}} and to set the Extra field to appear always and exclusively on the opposite side (which will be the front card or the back card depending on the variation provided by this note type)?

My purpose is that the Header field always appears in the top of the screen the Extra field appears only together with the answer.

Hope I was clear enough!

Try this:

Open the card template editor, open Card Type 1 and:
Add {{Header}} to the Front Template (on top of {{Front}})
Add {{Extra}} to the Back Template (below {{Back}})
I am not sure wether you want {{Header}} to appear on both the Front and Back of the card or just the Front.
If you want it on both sides: you don’t need to do anything.
If you only want it on the Front: go to the Back Template and replace {{FrontSide}} with {{Front}}

Then, open Card Type 2 and repeat the same identical steps, only this time {{Header}} will go on top of {{Back}} (on the Front side) and {{Extra}} will go below {{Front}} (on the back side)
If you want {{Header}} only on the Front, this time you need to replace {{FrontSide}} with {{Back}}

If this does not fix it and/or you need further help, please post a screenshot of your fields and one of your templates

1 Like

jcznk, thanks so much for the reply!

That’s what I would like to see:

Card Type 1 Front:
Anki_Frente

Card Type 1 Back:
Anki_Verso

Card Type 2 Front:
Anki_Frente2

Card Type 2 Back:
Anki_Verso2

(to be continued)

I tried to replace {{FrontSide}} with {{Front}} as you suggested, but {{FrontSide}} keeps turning back.

On code, I tried the following:

Card Type 1 Front:

Card Type 1 Back:

Card Type 2 Front:

Card Type 2 Back:

(to be continued)

However, when I click on Flip (“Virar” in portuguese) the following happens:

Card Type 1 Back:

Card Type 1 Front:

Card Type 2 Back:

Card Type 2 Front:

I still don’t get the logic behid those automatic changes.

I would like Header to always appear on top and Extra always to appear on the bottom, and for Anki to do its job of reversing only the Front and Back, leaving Header and Extra alone.

I think the Flip button works this way:

  • Anything that was on the Front template (Modelo da Frente) gets transfered to the Back template (Modelo do Verso), below <hr id="answer">
  • Anything that was on the Back template below <hr id=answer> gets transfered to the Front template
  • Anything that was on the Back template above <hr id=answer> gets lost and replaced with {{FrontSide}}

That said, you do not need to click on the Flip button at all, at least if I understand correctly what you’re trying to achieve.
You just need to manually configure Card Type 1 (which will be Front → Back) and Card Type 2 (which will be Back → Front), then click on ‘Save’.

Try the following code:

Card Type 1 Front template:

<div style='font-family: "Arial"; font-size: 20px;'>{{Header}}</div>

<hr>

{{Front}}

Card Type 1 Back template:

{{FrontSide}}

<hr id=answer>

{{Back}}

<hr>

{{Extra}}

Card Type 2 Front template:

<div style='font-family: "Arial"; font-size: 20px;'>{{Header}}</div>

<hr>

{{Back}}

Card Type 2 Back template:

{{FrontSide}}

<hr id=answer>

{{Front}}

<hr>

{{Extra}}
2 Likes

Perfect! It turned out the way I wanted. Thanks so much, @jcznk !!! :smiling_face_with_three_hearts:

1 Like