Laisvunas,
this is AWESOME plugin! I got it working pretty easily for what I’m doing.
I’m having a problem getting the TOTAL ENTRIES count to work. Here is what I have:
{exp:entries_list weblog="web_design_directory" entry_id="{entry_id}" sort="asc" orderby="title" date_format="%m/%d/%Y"}
{if entries_list_total_results > 0}
<div class="paginate">
{if previous_entry_title != ""}
<span class="wdt_prev">
<a href="http://{site_url}index.php/wdd_surf/{previous_entry_id}/{previous_entry_title}">_ < Previous_ </a>
</span> |
{/if}
{entries_list_absolute_count} / CAN'T GET A TOTAL COUNT # HERE!
....
{/exp:entries_list}
Just after the {entries_list_absolute_count} / I can’t get a total number to work… I’ve tried:
10) entries_list_total_results 11) entries_list_count 13) entries_list_separate_count 14) entries_list_weblog_count 15) entries_list_category_count 34) entries_list_weblog_count_total
All without luck. What I want is the Total number of entries for this list.
Thanks so much for any help in advance. This really is a great tool!
The full thing is here… the entries list is being used as a navigation in a top div above an iframe which shows web design company websites.
<html>
{exp:weblog:entries entry_id="" limit="1" orderby="title" weblog="web_design_directory"}
<head>
<title>{title} | {site_name}</title>
...
</head>
<body>
<div class="wdd_container">
{!--{embed="site/wdd_directory_top"}--}
<div class="wdd_directory_top">
<div class="wdt_nav">
{exp:entries_list weblog="web_design_directory" entry_id="{entry_id}" sort="asc" orderby="title" date_format="%m/%d/%Y"}
{if entries_list_total_results > 0}
<div class="paginate">
{if previous_entry_title != ""}
<span class="wdt_prev">
<a href="http://{site_url}index.php/wdd_surf/{previous_entry_id}/{previous_entry_title}">_ < Previous_ </a>
</span> |
{/if}
{entries_list_absolute_count} / {entries_list_total_results}
{if next_entry_title != ""}
| <span class="wdt_next">
<a href="http://{site_url}index.php/wdd_surf/{next_entry_id}/{next_entry_title}/">_ {next_entry_title} >_ </a>
</span>
{/if}
</div>
{/if}
{/exp:entries_list}
</div>
</div>
</div>
<iframe frameborder="0" height="100%" scrolling="auto" style="width: 100%; height: 100%;" allowtransparency="true" src="{wd_url}" id="wdd_site"/>
</div>
</body>
{/exp:weblog:entries}
</html>
Hi Chuck,
I tried tthis part of your code
{exp:entries_list weblog="web_design_directory" entry_id="{entry_id}" sort="asc" orderby="title" date_format="%m/%d/%Y"}
{if entries_list_total_results > 0}
<div class="paginate">
{if previous_entry_title != ""}
<span class="wdt_prev">
<a href="http://{site_url}index.php/wdd_surf/{previous_entry_id}/{previous_entry_title}">_ < Previous_ </a>
</span> |
{/if}
{entries_list_absolute_count} / {entries_list_total_results}
{if next_entry_title != ""}
| <span class="wdt_next">
<a href="http://{site_url}index.php/wdd_surf/{next_entry_id}/{next_entry_title}/">_ {next_entry_title} >_ </a>
</span>
{/if}
</div>
{/if}
{/exp:entries_list}
having changed only weblog short name and {entry_id} into correct entry_id number and it worked correctly, that is both instances of {entries_list_total_results} variable outputted correct result “1”.
Ah.. ha.
Because I have ‘limit=”1”’ in the top exp:weblog:entries it thinks 1 is the total. But the total is 350something, and I’m using your plugin to navigate through them one entry at a time.
The first number -{entries_list_absolute_count} - DOES show the correct placement (it will say 110 or 111 as I’m going through.
Hmm… I might need to just use {total_results} or something outside the entries_list right to show the total entries available, right?
Because I have ‘limit=“1”’ in the top exp:weblog:entries it thinks 1 is the total.
No. {entries_list_total_results} outputs “1” because there is parameter “entry_id” defined. In case “entry_id” is defined and entry with such entry id exists {entries_list_total_results} outputs “1”.
If you need to output the number of all entries, then put another exp:entries_list tag without “entry_id” parameter.
Wow! This plugin has completely eluded me until today. I found it over on Devot-ee while searching for a solution to the problem I’m looking to solve posted here.
Is this plug-in the answer?
Hi Todd,
To solve your problem I would use Simple Math plugin inside {paginate}{/paginate} variable pair of exp:weblog:entries tag.
Hello Laisvunas,
Ok. I’m trying to follow you on this one. I appreciate your timely response.
First of all, I still want to include the regular pagination links at the bottom of the page. The content that I’m trying to generate will be at the top of the page and will not contain any links. It will just be an indicator of which entries are currently being viewed.
So a few questions come to mind.
Can I have two {paginate}{/paginate} on the same template with different functionality? If so, how I would get to the numbers to pass them to the plugin? How would I pass the limit set into the plugin? How would I pass the currently viewed paginated page and have it make sense to the plugin?
The math portion seems very simple. It’s getting the numbers into the calculator in the first place I’m having trouble with.
Laisvunas, it seems like your plugin might have the ability to solve my problem. I’m working on adding some additional desired navigation to a photography site. I created the site to use a dedicated weblog for the photo entries, and entries may be categorized into multiple categories. That’s what’s causing me some difficulty. I need to create next/prev links WITHIN a category. I can sort by category in a list view without any trouble, but on my individual photo details template, the category you came from is not part of the template (I couldn’t think of a way to include it in the solo template because a photo can be in multiple categories). It seems like next/prev is easy enough when you can simply indicate a single category id, but when the image is in more than one category, how to you pass the category id into the single entry template? Can your plugin help with this? I’m new to EE and PHP, so I’m sure there’s a workaround, but I just haven’t been able to grasp it in the forums.
Here are the relevant links:
Example of the categorized thumbnail view
Example of the single entry view to which i would like to add within-category next/prev links
As it stands right now, if I try to put next/prev links in, it’ll simply sort them by date and start jumping from one image to the next regardless of category, which confuses the viewer. But without having the ability to put a category id into the next/prev tag directly, I can’t see how to limit the view.
Thanks for your advice!
John
I can sort by category in a list view without any trouble, but on my individual photo details template, the category you came from is not part of the template (I couldn’t think of a way to include it in the solo template because a photo can be in multiple categories). It seems like next/prev is easy enough when you can simply indicate a single category id, but when the image is in more than one category, how to you pass the category id into the single entry template?
It seems that clicking on the thumbnail should cause the form to be submitted; that form should contain category id number of the category you came from. Then the template gallery/comments will use that category id number to create previous/next links for the images posted in that category. To get POST value in gallery/comments template you can use GET/POST Parameters plugin.
Ok,i think I get the premise - a form would be a way to actively pass an EE-parsed variable from the thumbnail template into the single view template. Only catch is that as an EE newbie, I don’t know how to make each thumbnail link into a form. Is there a page within the documentation, a forum topic or wiki post that would walk me through the basics of doing that?
Thanks! John
Ok,i think I get the premise - a form would be a way to actively pass an EE-parsed variable from the thumbnail template into the single view template. Only catch is that as an EE newbie, I don’t know how to make each thumbnail link into a form. Is there a page within the documentation, a forum topic or wiki post that would walk me through the basics of doing that?
There is nothing specific to ExpressionEngine in this problem; to achieve submitting a form when an image is clicked you should use HTML + javascript.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.