• Resolved Stu Carpenter

    (@greatbig47)


    Hello Pod Gods…please help! ??

    My prime objective is to list the individual “lands” within the parks in the sidebar using only PODS template. I wanted to list them dynamically, but I don’t know if it’s possible. I haven’t ruled it out… I’d like to only have to edit things in one place in the future. Lands change…especially recently.

    I have a PODS Template called Parks – Land
    I tried this, with no luck…

    <h4>{@name}</h4>
    
    [if magic_kingdom]
    <h4><a href="/parks/magic-kingdom/">Magic Kingdom</a></h4>
    <a href="/parks/magic-kingdom/adventureland/">Adventureland</a><br>
    <a href="/parks/magic-kingdom/fantasyland/">Fantasyland</a><br>
    <a href="/parks/magic-kingdom/frontierland/">Frontierland</a><br>
    <a href="/parks/magic-kingdom/liberty-square/">Liberty Square</a><br>
    <a href="/parks/magic-kingdom/main-street-usa/">Main St. USA</a><br>
    <a href="/parks/magic-kingdom/tomorrowland/">Tomorrowland</a><br>
    [/if]
    
    [if epcot]
    <h4><a href="/parks/epcot/">Epcot</a></h4>
    <a href="/parks/magic-kingdom/adventureland/">Adventureland</a><br>
    <a href="/parks/magic-kingdom/fantasyland/">Fantasyland</a><br>
    <a href="/parks/magic-kingdom/frontierland/">Frontierland</a><br>
    <a href="/parks/magic-kingdom/liberty-square/">Liberty Square</a><br>
    <a href="/parks/magic-kingdom/main-street-usa/">Main St. USA</a><br>
    <a href="/parks/magic-kingdom/tomorrowland/">Tomorrowland</a><br>
    [/if]
    
    [if hollywood-studios]
    <h4><a href="/parks/hollywood-studios/">Hollywood Studios</a></h4>
    <a href="/parks/magic-kingdom/adventureland/">Adventureland</a><br>
    <a href="/parks/magic-kingdom/fantasyland/">Fantasyland</a><br>
    <a href="/parks/magic-kingdom/frontierland/">Frontierland</a><br>
    <a href="/parks/magic-kingdom/liberty-square/">Liberty Square</a><br>
    <a href="/parks/magic-kingdom/main-street-usa/">Main St. USA</a><br>
    <a href="/parks/magic-kingdom/tomorrowland/">Tomorrowland</a><br>
    [/if]
    
    [if animal-kingdom]
    <h4><a href="/parks/magic-kingdom/">Animal Kingdom</a></h4>
    <a href="/parks/magic-kingdom/adventureland/">Adventureland</a><br>
    <a href="/parks/magic-kingdom/fantasyland/">Fantasyland</a><br>
    <a href="/parks/magic-kingdom/frontierland/">Frontierland</a><br>
    <a href="/parks/magic-kingdom/liberty-square/">Liberty Square</a><br>
    <a href="/parks/magic-kingdom/main-street-usa/">Main St. USA</a><br>
    <a href="/parks/magic-kingdom/tomorrowland/">Tomorrowland</a><br>
    [/if]
    

    I’d like to scale it down.I’d like to see something as simple as (quick example)…

    [if park]
    {@park_name}
    [if park-land]
    [each land]
    [/each]
    [/if]
    [/if]

    • Presently at the moment, I have a static HTML sidebar widget, with the name of the park in the tab. The drawback to this (besides the obvious of it being static) is it doesn’t create a link the name of the park back…it just navigates through the lands.
    • There’s a sidebar widget labled “List of Lands single”…That’s where I’m working.
    • Like I mentioned, I’d REALLY like to pull up the lands dynamically, and not like above.
    • It’s all in categories, as you can tell by links in the code above.
    • I’m using “Category” as an extended Taxonomy
    • As a widget for the sidebar, I’m using Pods – Single Item (part of the problem?)

    I know the answer is probably right in front of me, and I’m not seeing it.
    I hope you can help me out. Thank you so much in advance!

    • This topic was modified 4 years, 3 months ago by Stu Carpenter.

    The page I need help with: [log in to see the link]

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

    (@keraweb)

    Hello @greatbig47

    Is park-land the category name?
    I believe if you have linked categories you could do something like this:

    
    [if category_name]
    [each category_name]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    

    Within [each][/each] all magic tags refer to the current iterated object.

    Cheers, Jory

    Thread Starter Stu Carpenter

    (@greatbig47)

    Parks – Land is a PODS Template.

    I’m accessing it from a sidebar widget (PODS – Single Item List of Lands single)

    These are the category structure with corresponding links to their category home pages.

    My goal for the sideba…

    1. pull up the name of the park (as a link)
    2. List the lands inside each park (also as links)
    3. All on the same template

    It presently has a static sidebar widget for each park. It works, but I know there’s a better way to pull up the links dynamically.

    the Lands are also categories in their respective parks.

    These are some of the category structures with corresponding links to their Lands category pages..

    I’m looking for a way to simple list the Name of the Parks with the Lands.

    Thanks!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @greatbig47

    I get what you want to do ??

    Have you tried my code example?

    Cheers, Jory

    Thread Starter Stu Carpenter

    (@greatbig47)

    Hey Jori,

    Yeah, I tried it, but I think I’m not plugging it in right. You got the idea, and your code example is exactly the approach I’m looking for…We’re close ??

    I turned the PODS template off and started using the “Custom Template” field in the Sidebar Widget. I can come back to using a template once I figure out the right way to do it.

    These are the failed attempts I’ve tried so far…

    [if category_name]
    [each category_name]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    
    [if category]
    [each category.name]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    
    [if magic-kingdom]
    [each category]
    <a href="{@permalink}">{@name}</a>
    [/each]
    [/if]

    But nothing is showing up.
    What am I doing wrong?
    Thanks, Jori!

    Plugin Author Jory Hogeveen

    (@keraweb)

    You need to replace category_name in my example with the name of your taxonomy (pod).
    Both the [if] and the [each] need to be replaced!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Oh, and please view our introduction video so you get a better understanding of how Pods templates work:
    https://docs.pods.io/videos/grow-beyond-posts-pages-introduction-pods-framework/

    Thread Starter Stu Carpenter

    (@greatbig47)

    Here’s what I have now…

    [if magic-kingdom]
    [each category]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    
    [if epcot]
    [each  category]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    
    [if hollywood-studios]
    [each category]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    
    [if animal-kingdom]
    [each category]
    <a href="{@permalink}">{@title}</a>
    [/each]
    [/if]
    Plugin Author Jory Hogeveen

    (@keraweb)

    I still see the name category in your loops…
    Please read my reply’s again.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Listing Category Info in Sidebar’ is closed to new replies.