Filtering with tagged tags, also exclusions

Now that my triangular-linking Gift Ideas notebook worked out, I’m trying to build something more complex and multi-layered: A food & beverages journal/log/notebook.

I’ve got the data already imported in the following format, my questions regard filtering through them.

Here’s my setup: items & places linked together, so numerous Places can offer the same Item:

title: coffee
tags: type
title: sweet
tags: type
title: Lemon Pie
tags: sweet
title: Americano
tags: coffee
title: Little Coffee Shop
tags: place
title: Corpo-Coffee Ltd.
tags: place
title: Link 1
tags: link
link-source: Little Coffee Shop
link-item: Americano
score: 4
title: Link 2
tags: link
link-source: Corpo-Coffee Ltd.
link-item: Americano
score: 2
title: Link 3
tags: link
link-source: Little Coffee Shop
link-item: Lemon Pie
score: 5

On each place I’m using a ViewTemplate to display its linked items:

title: .templatePlace
tags: $:/tags/ViewTemplate
text:
<$list filter="[all[current]tag[place]]">

<ul>
	<$list 
	filter="[tag[link]link-source{!!title}]">
			<li> <$link to={{!!link-item}}/>  --- <$link to={{!!title}}>🔗</$link></li>
	</$list>
</ul>

I then have @EricShulman’s <<edit-list>> to be able to add new items to the current place:

<<edit-list 
	field: temp-selection
	filter: "[tag[coffee]] [tag[sweet]]"
	find: or 
>>

Here are my two questions regarding filters inside <<edit-list>>:

  1. Instead of manually enumerating all types(coffee, sweet, etc), how can I describe 'anything tagged with a tag which is itself tagged with type'?
    edit: Found it! It’s filter: "[tag[type]tagging[]"
  2. How can I exclude those already linked to this place from the results? In the above scenario, Little Coffee Shop page should not offer Americano as a new entry since it’s already linked via Link 1.
    edit 2: Found it! It’s filter:"[tag[type]tagging[]sort[]] -[tag[link]link-source{!!title}get[link-item]]"

Replying to myself to mark it as solved, copying my own answers for clarity:

  1. Instead of manually enumerating all types(coffee, sweet, etc), how can I describe 'anything tagged with a tag which is itself tagged with type'?

Solution: It’s filter: "[tag[type]tagging[]"

  1. How can I exclude those already linked to this place from the results? In the above scenario, Little Coffee Shop page should not offer Americano as a new entry since it’s already linked via Link 1.

Solution: It’s filter:"[tag[type]tagging[]sort[]] -[tag[link]link-source{!!title}get[link-item]]"

Congratulations on finding your answer! (Always a nice feeling, isn’t it?)

And thank you very much for sharing the results back here. Such activities make for a healthy community.