Skip to content

Conversation

@davidpede
Copy link

What does it do?

Adds a new optional depth parameter to TaggerGetTags that adds a search depth for child resources for each parent.

To keep this bc I guess the default should be changed to 1 - I've set it as 10.

Use like:

[[!TaggerGetTags?
    &parents=`1,2,3`
    &depth=`2`
    &rowTpl=`@INLINE <option value="[[+uri]]">[[+tag]]</option>`
]]

Why is it needed?

Currently when using the parents parameter only tags from immediate child resources are returned. This allows fetching tags from deeper down the resource tree.

@matdave matdave requested a review from theboxer December 14, 2020 23:16
$c->where(array(
'Resource.parent:IN' => $parents,
));
if (!empty($parents)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like duplicit condition:

if (!empty($parents)) {
if (!empty($parents)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants