Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Need Help to Create Post List from Specific Tags

  • #2673
    Avatar photo[anonymous]

    Hi,

    I got the following example working great for non-lazy load pages:

    https://getpublii.com/dev/create-post-list-from-specific-tags/

    However, I can’t get working for lazy load, as I don’t understand handlebars and sub-expressions.

    The article stated to substitute `{{{lazyLoadForContentImages text}}}`  for this`{{{parseShortcode (lazyLoadForContentImages text)}}}`

    However the post.hbs file of the simple theme has {{{lazyLoadForContentImages text @config.custom.lazyLoadEffect}}}

    How to I add `parseShortcode ` to this code? I can’t get working.

    Thanks.

    #2678
    Avatar photo[anonymous]

    Anyone able to assist?

    #2679
    Avatar photo[anonymous]

    Hi,

    Please try to use:

    {{{parseShortcode (lazyLoadForContentImages text @config.custom.lazyLoadEffect)}}}

    #2680
    Avatar photo[anonymous]

    doesn’t work (whether i add the code or replace it)..got the following error….

    Rendering process failed

    An error (1002) occurred during parsing post.hbs file.
    
    Cannot read property 'match' of undefined
    
    placed the code here:
                {{#if @config.custom.lazyLoad}}
    	{{{parseShortcode (lazyLoadForContentImages text @config.custom.lazyLoadEffect)}}}
                   {{{lazyLoadForContentImages text @config.custom.lazyLoadEffect}}}
                {{else}}
                    {{{parseShortcode text}}}
                {{/if}}
    #2681
    Avatar photoBob

    Hi Jaxterama, I think you don’t need it. The upcoming version of Publi 0.36 comes with a native lazy loading mechanism, so the helper won’t be needed anymore. Have a look at any of the available themes compatible with 0.36 version https://forum.getpublii.com/topic/publii-0-36-prerelease-5/ and you will see what I’m talking about.

    #10137
    Avatar photo[anonymous]

    Hi.

    I followed the instructions from this page and got stuck on the last step, which is entering the code into the post. Where to enter exactly?
    [posts tags="x,y,z" count="5"]
    #10138
    Avatar photo[anonymous]