Sign in

Need Help to Create Post List from Specific Tags

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2673
    jaxterama

    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
    jaxterama

    Anyone able to assist?

    #2679
    Tomasz DziudaTomasz Dziuda
    Moderator

    Hi,

    Please try to use:

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

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #2680
    jaxterama

    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
    BobBob
    Support

    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://getpublii.com/forum/topic/publii-0-36-prerelease-5/ and you will see what I’m talking about.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.