Does format work in nested cardtypes?

Support Ticket

+status
acknowledged
+tags
 

Hi everyone, I'm having a problem with nested formatting of newly created cardtypes.

Picking up on your recipes example, to be clearer:

I created a new card type, let's call it Recipe cardtype.

I then created a new cardtype, let's call it Preparation cardtype and included this cardtype in the Recipe's cardtype content as {{+preparar | type=Preparation}}.

I formatted Preparation's content to include some formatting as well, let's say:

Start: {{+start}}

Finish-off: {{+finish}}

 

When i try to instanciate a new Recipe, i see the ability to input the new card "preparar", but this card's type is set to Basic, instead of "Preparation" as I would expect it to be.

Is there any issue with the nesting I'm doing on cardtypes and formatting? Or, is it because i reference newly created cardtypes? If, when directly inserting data into a newly created Recipe card, i change the "+preparar" cardtype from Basic to "Preparation" I do see the desired formatting, but would like to have it pre-selected.

Am I doing something wrong? Please help! :) 

 

Great question!  The short answer is "yes" in viewing mode and "soon" in edit mode.

 

There is a small syntax error in the preparer inclusion; you have a "=" where you need a ":".  So it should be "type:preparer".

 

Once that is correct, these things should work properly:

  1. clicking directly on Add +preparer should give you the right type with the right formatting
  2. saving it should work and let you read it with the correct formatting
  3. the formatting will render correctly whenever you view the card in any context.
However the one thing that won't work is that when you edit the Recipe, you won't be able to get the preparation form nested inside it.  In fact, I'm not sure exactly what you'll see.  Can you let me know if you try it?
 
- ethan

Hi Ethan, Thank you, that ":" was obviously the problem. And yes, I did try to Edit the whole "Recipe" card. What happens is I get a regular form field for Preparation which is already filled out with what i literally put in Preparation's cardtype content, meaning wagn terms using double-curvy brackets aren't being translated to anything. I do, however, have the ability to correctly edit the Preparation card when i click on "Add +preparer", as you indicated, so it's a decent workaround for now. Thank you again!

  --catia Goncalves.....Mon Dec 05 10:00:51 -0800 2011


OK, very important note on this subject. Taking the "Recipe" example described above, I do have to declare the type for the "+start" and "+finish" cards in the Preparation cardtype content formatting because it does not default to Basic cardtype (as I was expecting it to) but rather its "parent" cardtype which is "Preparation" cardtype and that just makes a whole lot of nested mess when editing a "Recipe". Just thought I'd let you know :)

  --catia Goncalves.....Mon Dec 05 10:18:55 -0800 2011


whoa. really? That's bizarre. I don't think I've ever seen that before. that really shouldn't be the case. You might try going to /admin/clear_cache to make sure something isn't out of sync.

  --Ethan McCutchen.....Mon Dec 05 11:02:08 -0800 2011