I know this code to retrieve article by a handle
{% assign article = articles['news/hello-world'] %}
But in the place of news/hello-world
I need to place liquid tag like
{% assign article = articles[‘{{ block.settings.article1 }}’] %}
But this code is not working.
I am also attempting to do this and would love some assistance. I’ve tried a slew of methods that don’t seem to wkrk
I handle it this way
{% assign blog = blogs[block.settings.blog_category] %}
{% assign blog_handle = block.settings.blog_title | strip | handle %}
{% assign article_handle_template = 'blog_category/article_handle' %}
{% assign article_handle = article_handle_template | replace: 'blog_category', block.settings.blog_category | replace: 'article_handle', blog_handle %}
{% assign article = articles[article_handle] %}