Problem retrieving entries, but azlist works fine.
So, I have something of an unusual use-case (maybe). I'm trying to generate a list using low_alphabet but I need all the entries to show up on the page rather than using a sub-page. Also, the site is using Stash pretty heavily (if that matters).
So, this works fine, exactly as expected:
{exp:low_alphabet:azlist channel="partners" show_empty="yes" group_numbers="yes"}
{low_alphabet_label}
{/exp:low_alphabet:azlist}
This part does not... I might be doing this wrong, but I've replicated this 25 times, one for each letter. I haven't done the layout yet, trying to get the tool to work first. The result, however, is nothing.. at all... nothing renders (on any of them, even ones where the IS data to render out). When I use a regular channel entries loop, I get channel data.
{exp:low_alphabet:entries channel="partners" alpha_filter="0-9"}
{if count == 1}
{/if}
{title}
{if count == total_results}
{/if} {title}
{if count == total_results}
{/exp:low_alphabet:entries}
I'm using EE 2.5.2
Replies
kvetchus 5 Jul 2012 18:31
Sorry, the HTML parts aren't showing... try this:
Works:
<div class="partner-azlist">
{exp:low_alphabet:azlist channel="partners" show_empty="yes" group_numbers="yes"}
<a href="#{low_alphabet_label}">{low_alphabet_label}</a>
{/exp:low_alphabet:azlist}
</div>
Does not work:
{exp:low_alphabet:entries channel="partners" alpha_filter="0-9"}
{if count == 1}<a name="{low_alphabet_label}"></a><div class="alpha-section" id="alpha-section-{low_alphabet_label}">{/if}
<div class="partner-list-title" rel="#partner_info_{entry_id}" data-partner-name="{title}">
<strong>{title}</strong>
</div>
{if count == total_results}</div>{/if}
{/exp:low_alphabet:entries}
kvetchus 5 Jul 2012 23:26
Looks like I was using a capital letter instead of lower case. So, when I make it lower, I get the loop to run and it pulls entries. But the variable {low_alphabet_label} simply prints out "{low_alphabet_label}" instead of the letter.
Low 6 Jul 2012 08:06
Hi Michael,
Can you try and set the dynamic="no" parameter to the tag?
Also, you don't need to have 25 separate tags to display all entries. The variables {low_alphabet_heading} and {low_alphabet_footer} will allow you to create the output you need with a single tag. Something like:
...just make sure the limit="" parameter is set if you're displaying more than a 100 entries in one go. Also, the disable="" parameter can also be set, which might help performance.
kvetchus 6 Jul 2012 15:47
Still doesn't work. When I use the header and footer variables, it doesn't render anything in the IF blocks.
The template doesn't seem to be processing those variables. the {exp:low_alphabet:entries} loop IS running, but none of the variables are rendering. It doesn't matter if I set dynamic=="no" or not (also, the disable param is set, I use a global for that: disable="{global:disabled_params}" which renders "trackbacks|pagination" so that's in there too. eventually, there probably will be more than 100, but right now there is only 5 results to render...
I've verified the plugin and extension are installed.. is there something in setup I might have missed?
Low 7 Jul 2012 10:45
Any chance I can take a look myself? I'd need superadmin login credentials, which you can send to hi at gotolow dot com.
kvetchus 7 Jul 2012 15:53
Actually -- just now I figured it out! I needed to disable Transcribe: transcribe="disable"
Once I added that in, it worked perfectly, the code you give me worked exactly right once the variables rendered out. I'll send you a link once The Nerdery gets around to updating my commit to their staging site. Litzinger is on vacation though :)
Low 8 Jul 2012 09:54
Cool, glad it's working for you now. :)