Hello,
I want to use this extension with cargo ? Is it possible ? What do I modify to achieve this ?
Regards
JMU
Hello,
I want to use this extension with cargo ? Is it possible ? What do I modify to achieve this ?
Regards
JMU
That's still a work in progress. Seehttps://github.com/enterprisemediawiki/SemanticActions/issues/21 for some of the work necessary. That said, you should be able to use Actionable board cargo instead of the Actionable board template to try Cargo out.
One important thing to note is that Cargo has one flaw for this use case, in my opinion. Cargo queries do not include results where values are redirects.
Let's say there's a page called Action:60 and it has the value of "Puppy" as a value for Related_article. But "Puppy" is just a redirect to the page called "Dog". Action:60 will not show up in the results of a query filtering on the value of the redirected-to page "Dog".
Such a query would look like the following example.
{{#cargo_query: tables=Actionable |fields=Action_ID, _pageName, Related_article__full = Related article |where=Related_article HOLDS 'Dog' |group by=Related_article }}
{{#cargo_query: tables=Actionable |fields=Action_ID, _pageName, Related_article__full = Related article |where=Related_article HOLDS 'Puppy' |group by=Related_article }}
{{#cargo_query: tables=Actionable |fields=Action_ID, _pageName, Related_article__full = Related article |where=Related_article HOLDS 'Dog' |group by=Related_article }}
{{#ask: [[Related article::Puppy]] |?Action ID |?Related article }}
{{#ask: [[Related article::Dog]] |?Action ID |?Related article }}
This is because Cargo treats a redirect to a page and that redirect-to page as separate entities. Technically speaking, they are. But when using SMW they are treated as equal. We have 8+ years of treating redirects as equal to the redirected-to pages.
This means two very important things if you are going to use Cargo: