specifiable relative content for plus cards+solution

Suppose we have a Deck named Zappa Wagn and want a link on that deck to create a Note with +re already filled in with "Zappa Wagn".

 

We can do that by putting a link on Deck+*tform:

create a Note for work on specifiable relative content for plus cards+solution

Additional fields on the note can be filled out by simply adding parameters:

create a Note for work on specifiable relative content for plus cards+solution

If the plus card having default content handed to it is a pointer you can add multiple items separated by a newline, encoded as %0A

 

==========================================

Most of the rest of this is defunct. Some may go into a new ticket.

 

It is not enough to know the HTTP_REFERER, because the Zappa Wagn card may show up in recent changes, on the Deck card, etc, and in all of those cases the HTP_REFERER would be the main card.  So the request itself must carry the information.  That means we could either (a) automatically append the information to all such links, or (b) require the user to append this information.  I don't know how (a) would work.  Here's how (b) might work:

add Note

Note that (b) has the advantage of finer grain control, and of working from anywhere desired, not just from the referrer card.

 

In this example we just use the variable name "var", but we will probably want to think a good bit more about the form and scope of variables we'll support.

 

Instead of var, what if we supported anything beginning with "$" as a variable?  It could be very useful to be able to put multiple variables in a link.  For example, if we wanted a special link for sys admin emergencies, we could make it create tickets that are urgent, in progress, assigned to Lewis, and tagged sysadmin all with one link.  -EFM

 

Then we could sub in a variable at the point of creation.  So if you were on a Deck called "Zappa Wagn" and clicked a link like add Note, then +re in the resulting multi-edit will contain "Zappa Wagn" (i.e., if it's a Pointer, it will contain one item - Zappa Wagn). If there is no referring card (i.e., created through Search bar or by any means if the type is set via the cardtype menu), then _referrer returns a null string.

 

Two solutions for setting the default content according to the referer are being explored; we'll probably do both ultimately:

 

Through right formatting / inclusion syntax

 

In re+*rform you can put:

or _var

...and when +re is created, it will be replaced with an inclusion or link to the card from which you created the Note.

 

If _var is absent, the entire link or inclusion is substituted for an empty string.

 

 

Through inclusion syntax

 

We've also talked about adding a new way to set default content via inclusions:

 

On Note+*tform you can include something like:

...and when a Note is about to be created, +re is auto-filled with the content "hello world".

 

If we could do that, then we could potentially do the same thing as above wrt content substitution.  Within the quotes, you can use _var and it will be replaced with a link to the card specified in the variable. Eg:

Note that making this work would require two preliminary changes: (1) supporting default content via inclusions, and (2) respecting this syntax in multi-edit, which currently breaks for type - see apply type in inclusions when multi-editing