We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugins that return ’’ make my page not display

Development and Programming

Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

I have the following code:

<div id="sidebar">
        {exp:categoree parse="inward"}
            {exp:gallery:entries gallery="{gallery_name}" orderby="date" sort="desc" columns="10" rows="1"}
                {entries}
                {row_start} {/row_start}
                {row}
                <div class="thumbnail">
                    {if width > height}
                    <div class="landscape">
                        <a href="#" onclick="return getLandscapeImage('placeholder','{image_url}');">{exp:imgsizer:size src="{image_url}" width="{thumb_size}" alt="{title}" }</a>
                    </div>
                    {if:else}
                    <div class="portrait">
                        <a href="#" onclick="return getPortraitImage('placeholder','{image_url}');">{exp:imgsizer:size src="{image_url}" height="{thumb_size}" alt="{title}" }</a>
                    </div>
                    {/if}
                </div> <!-- thumbnail -->
                {/row}
                {row_blank} {/row_blank}
                {row_end} {/row_end}
            {/entries}
            
            {paginate}
                <div class="paginate">
                    {pagination_links}
                </div> <!-- paginate -->
            {/paginate}
            
            {/exp:gallery:entries}
        {/exp:categoree}
        
        </div> <!-- sidebar -->

I am author of the categoree plugin and when no tags are used it should return ”.

But when I look at my template, none of code in the ‘sidebar’ div is displayed!

If I do put in a categoree tag ($num_entries), then all works well.

Is this normal?

I am trying to get the $num_entries (return by categoree) used in a conditional, but I am having some difficulty.

Thanks

Mod Edit: Moved to the Plugins: Technical Assistance forum.

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

Thanks to the super-patience of Mr. Jones, I have worked through this issue.

I had two things wrong with my code: 1) I needed to use $FNS->prep_conditionals so that the conditionals worked at all 2) I need to make sure that the data in my results array matches the conditional I am testing. I was checking ‘num_entries’, but the data in the results array was ‘total_files’ so it wasn’t getting picked up.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.