• Resolved cliffo4

    (@cliffo4)


    Hi

    I have a PODS defined in a page (and a modified one that will call a template), and thought would be hand to use the If shortcode to select a different block of text when the PODS returns no entries. However I am having difficulty as it seems when there are no records, the test for if a field exists never gets executed as it never runs the template or code within the PODS definition.

    So what mechanism exists to either show a different template when no records or at least a way in the PODS /PODS shortcode block to If/ELSE and output something else? Seems easy, but I can not see/find a way and really want to avoid having to inject PHP code or theme alterations.

    Many thanks
    Clifford

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @cliffo4

    Not sure I fully understand but it seems to me you are searching for the not_found parameter.

    Example:
    [pods type="cpt" not_found="Some text"]

    Cheers, Jory

    Thread Starter cliffo4

    (@cliffo4)

    I will have a look and see. Thanks

    Thread Starter cliffo4

    (@cliffo4)

    Seems using the not_found in the PODS shortcode and using a template than all the code after the initial PODS does get me to where I can get a “no items found” solution.

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to show something when PODS is empty’ is closed to new replies.