Sign in

Need Help to Create Post List from Specific Tags

  • This topic has 4 replies, 3 voices, and was last updated 12 months ago by .
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 Dziuda

    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
    Bob

    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.

    --
    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.