Macros with 2 search parameters
I've got 2 qeustsion related to Macro:
- I'm trying to use Macros to generate a block of posts with certain category as below:
{ { ~ system : keyword_search:TemplServices["bx_posts", {"cat": "bx_posts_cats", "keyword": 0}, "unit_gallery.html"] ~ } }
I want to add another parameter so that I can show only 'featured' posts in this category. How can I add this to the Macro?
- my second question is about using labels with Macro. for the above example, instead of searching featured posts under certain categories, I want to get list of featured posts with certain label. How can I do this?
-
-
- · Scholar
-
·
In reply to LeonidS
- ·
mode:author did not work, but I used mode:featured and added the category, however, I'm now struggling to pass the unit_view to the macro. Here is what I use but still does not work
{ { ~bx_posts:browse[{"mode":"featured", "params":{"cat":"12", "unit_view":"gallery"} } ] ~ } }
-
-
·
LeonidS
- ·
I've corrected my answer as the editor has cut macros example.
-
·
LeonidS
-
- · Scholar
-
·
In reply to LeonidS
- ·
Hi @LeonidS I received your first answer to my email, and I tried the code before adding my comment above. It's still doesn't work and I think because the "mode":"author" does not seem to recognize the params. I tried "mode":"featured" and it worked, but my main challenge now is to pass the 'unit_view' to the browse method.
-
-
·
LeonidS
- ·
-
·
LeonidS