• Resolved JLBA

    (@jltest)


    Hi everyone,

    I’m looking for something which looks basic. :
    – Display a list with pods item list
    – Clic on one item
    – Display its details with pods single item.

    How do I create the link between pods item list and pods single item ?

    And the link to go back ?

    thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Paul Clark

    (@pdclark)

    Display links to singular templates from Pods Item List block

    <h3><a href="{@permalink}">{@post_title}</a></h3>
    <p>{@ID,get_the_excerpt}</p>

    …where:

    • {@permalink} will output the singular URL according to the site’s permalink configuration.
    • {@post_title} will output the title of the post.
    • {@ID,get_the_excerpt} will output the calculated post content excerpt only if get_the_excerpt is added to Pods Admin > Settings > Display callbacks allowed

    Displaying Details for a Single Item

    This depends on what theme or page builder is in use for managing frontend templates, but generally, Pods Admin > Edit Pods > (The Pod) > Auto Template Options can be used to replace standard content output, which most every theme has, with a template defined in Pods Admin > Components > Pods Templates.

    If using a block-based theme with the core Site Editor, the singular template can be built visually and Pods Blocks can be used for the template.

    Link to go Back

    This depends on where you are displaying the Pods Item list.

    Most themes follow the WordPress Template Hierarchy, where the “Item List” is an Archive Page template.

    The option for enabling Archive Pages for a post type is found at Pods Admin > Edit Pods > (The Pod) > Advanced Options > Enable Archive Page, and Pods Auto Templates have an option to replace parts of that theme template by filtering the_excerpt.

    This is not always the configuration for a post listing, so your link back depends on where “Back” is:

    • If using a post type archive for a content type named articles, it might be <a href="/articles">Articles</a>.
    • More generically for above, if get_post_type_archive_link is added to Pods Admin > Settings > Display callbacks allowed, then <a href="{@post_type,get_post_type_archive_link}">Back to Listing</a> would output a link to the current content type’s archive page.
    • If you have placed a Pods Item List block elsewhere on the site, such as on a page with slug /listing/, link to that page: <a href="/listing/">The Listing</a>
    • If some other page builder or theme engine is in use, consider its structure and documentation regarding whether it uses WordPress core Archive Pages, the core template hierarchy, or replaces these things with something different.
    • Note that Content Type Archive Pages might be distinct from Taxonomy Term Archive Pages.
    Thread Starter JLBA

    (@jltest)

    Thanks Paul for your detailed answer. (Is it a page I didn’t find in pods support pages ?)

    I’m using Kadenz for templating and blocks.

    I did find the Auto template options for displaying Single item. But I’m still asking if it’s a right way to have a pods item list on one page, a pods single item on another page and create link between them ??

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