Sign up Sign in Samples Blog contact support
add n-depth inclusion syntax

Ticket

 
+issue

in current inclusion syntax, you can set the view of the card you're including as view:viewname.  And for items in that view with item:viewname.  But you can't set it for the item's items.  or, for that matter, you can't set anything on that item except for the view (like, say, image size) 

 

+solution

get rid of "item" and go for a nested structure by changing:

{{cardname|viewname; item:viewname}} 

to

{{cardname|viewname|viewname}} 

In other words, each pipe indicates a new depth of inclusion.  This could go as many levels as needed, would solve the aforementioned image problem as follows:

{{cardname|viewname|size:icon}} 

 

 

 

+example

Adding some examples to make sure this doesn't have any yet-unseen hitches:

  • {{List of pictures|content;show:menu|size:icon}}
  • {{List of song-lists|content;show:menu|content;show:menu|audio}}
    (where the list is a Pointer, the cards in it are also Pointers, and the cards in it are audio files. audio is an imagined view to play audio files :-)
  • ??

 

+discussion

Love it! Minor concern as it muddies the meaning of the pipe, making inclusion syntax a little less accessible to people first encountering it. On the flipside, adding a new symbol would also complexify the markup, so it's maybe the same amount of hurdle-raising either way. --John


Also the subject of Circle 25: new inclusion syntax.

--John Abbe.....2013-07-31 04:37:37 +0000

{{Image+*type+by_name|open;show:menu|titled;size:small}}

{{Image+*type+by_name|open;show:menu;item:titled}} (old way - can't specify size of images)

{{Pointer+*type+by_name|closed|titled;show:menu|name}}

{{Wagn 1.12+open tickets|titled|titled;show:title_link;structure:short ticket view}}

--John Abbe.....2013-08-01 17:21:44 +0000

 

+Relevant user stories