Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8957705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:03:14+00:00 2026-06-15T15:03:14+00:00

I am using playa in expression engine. My structure is an h1 heading, then

  • 0

I am using playa in expression engine. My structure is an h1 heading, then loop through the playa results. However, before I have the h1, I want to check if playa has any results. If yes, then display heading and results. If no, don’t display heading.

How can I check the count of playa results before I use them?

<section id="related-products">
<h1 class="product-page-titles">Related Products</h1>
<div>
    {exp:playa:children field="related_products"}
    <article>
        <a href="/product/{url_title}" title="{title}">
            <h2>{title}</h2>
            <img src="{hero_image}"/>
        </a>
    </article>
    {/exp:playa:children}
</div>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:03:15+00:00Added an answer on June 15, 2026 at 3:03 pm

    Indeed!

    {if "{exp:playa:total_children field='related_products'}"}
        ...
    {/if}
    

    (As per the docs.)

    Also – please consider posting future questions on the dedicated ExpressionEngine StackExchange site. That is where the action is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using play 1.2.x DB evolutions feature. I want to have the scripts
I'm using play-2.0.3. I have a Map and want to populate dropdown-list with Int->String
I have created several animations (storyboards) on different pages using Expression Blend. One case
I have been using play 1.2.5rc4 for development of one app and I have
I am using Play Framework 2.0 with Scala. So I have an action that
I have just started to learn the very basics of Java programming. Using a
Using play framework 1.2.4 with scala. I have few play jobs that looks like
I'm using play-1.2.3. I have two classes some kind of these: LabelItem: @Entity @Table(name=T_LABEL_ITEM)
I want to customize the default error message This field is required when using
am using play 2 framework with java I have added a project dependency as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.