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

Plugin: Entries List

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
about 16 years ago
Ryan M.'s avatar Ryan M.

One thing I’m trying to do with this plugin (version 2.9) that I don’t think is yet built in is use the ‘&’ operator for categories. I have a custom URL where 2 segments equal 2 categories, and I’m using Low’s Seg2Cat extension to get the category id’s for those segments. I’m then feeding those to Entries List Like this:

{exp:entries_list weblog="portfolio" category="{segment_3_category_id}&{segment_4_category_id}" entry_id="{segment_5}"}

which outputs like:

{exp:entries_list weblog="portfolio" category="4&26;" entry_id="94"}

(The code above keeps adding a ‘;’ after the number 26. It should read: category=”4&26”) If I pick one category or the other, my pagination seems to work fine, but I really could use the ‘&’ operator to narrow the entries down even further. Thanks!

       
Laisvunas's avatar
Laisvunas
879 posts
about 16 years ago
Laisvunas's avatar Laisvunas

Hi Ryan,

Thanks for reporting typos.

Grab the version 3.0 - I implemented in it ‘&’ operator for “category” parameter.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
about 16 years ago
Ryan M.'s avatar Ryan M.

Wow, excellent. This plugin helped make the very non-standard navigation on this site possible. Thanks for your quick update.

       
Laisvunas's avatar
Laisvunas
879 posts
about 16 years ago
Laisvunas's avatar Laisvunas

You owe me a Fav on devot-ee.com 😊

       
Ryan M.'s avatar
Ryan M.
1,511 posts
about 16 years ago
Ryan M.'s avatar Ryan M.

Not only favorited, but rated and reviewed as well: Entries List at devot:ee. Thanks again.

       
Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
15 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

Laisvunas,

I’m getting repeated blocks of this PHP error using Entries List:

Notice: Undefined index: cat_name in /home/yourdomain/html/regentsys/plugins/pi.entries_list.php on line 1204

Notice: Undefined index: cat_url_title in /home/yourdomain/html/regentsys/plugins/pi.entries_list.php on line 1205

Notice: Undefined index: cat_name in /home/yourdomain/html/regentsys/plugins/pi.entries_list.php on line 1233

Notice: Undefined index: cat_url_title in /home/yourdomain/html/regentsys/plugins/pi.entries_list.php on line 1234

Any ideas?

       
Laisvunas's avatar
Laisvunas
879 posts
15 years ago
Laisvunas's avatar Laisvunas

Hi Adrienne,

Check if you use the latest version. The latest version is 3.0.

       
Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
15 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

Laisvunas,

Yes, it’s 3.0.

I don’t have a category group assigned to those entries at all, which could be throwing it off. It’s just a NOTICE error, it won’t show to anyone who’s not a superadmin, so it’s not an earthshattering bug. but i thought i’d report it anyway!

       
Laisvunas's avatar
Laisvunas
879 posts
15 years ago
Laisvunas's avatar Laisvunas

Hi Adrienne,

Check version 3.0.1 - in it I added a couple of conditionals which should prevent error notices.

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

Hi Laisvunas! Thanks for the plugin update… No more PHP notice messages. Woot! 😊

Also, thanks for adding the “status” parameter.

Cheers, Micky

       
Laisvunas's avatar
Laisvunas
879 posts
15 years ago
Laisvunas's avatar Laisvunas

Hi,

I released version 3.4 of Entries List plugin (versions 3.1-3.3 were not released publicly).

New features:

1) “entry_series” optional parameter. Allows you to specify pipe delimited series of entry ids, e.g. entry_series=”78|95|54|22|156”. Entries will be outputted exactly in the same order. You also can specify up to 50 pipe delimited series of entry ids using parameters entry_series_1, entry_series_2, entry_series_3 … entry_series_48, entry_series_49, entry_series_50.

2) parameter “sort_separately” accepts value “entry_series”.

3) In case “sort_separately” has the value “entry_series” then parameter “count_start_on” accepts as a value pipe delimited entry series names, e.g. count_start_on=”entry_series_5|entry_series_6|entry_series_7”. In this case counting of entry series will start when the plugin will output entry posted into any of those entry series.

4) In case “sort_separately” has the value “entry_series” then parameter “count_stop_before” accepts as a value pipe delimited entry series names, e.g. count_stop_before=”entry_series_10|entry_series_11|entry_series_12”. In this case counting of entry series will stop just before the plugin will output entry posted into any of those entry series.

5) variable {entries_list_entry_series_count} - outputs count number (1, 2, 3 etc.) of the entry series whose entry is being displayed. Entry series are counted when parameter “sort_separately” has the value “entry_series”. Only non-empty entry series are counted.

6) variable {next_entry_entry_series_count} - outputs count number (1, 2, 3 etc.) of the entry_series to which next entry belongs. Entry series are counted when parameter “sort_separately” has the value “entry_series”. Only non-empty entry series are counted.

7) variable {previous_entry_entry_series_count} - outputs count number (1, 2, 3 etc.) of the entry_series to which previous entry belongs. Entry series are counted when parameter “sort_separately” has the value “entry_series”. Only non-empty entry series are counted.

8) variable {entries_list_entry_series_count_total} - outputs total number of entry series counted. Entry series are counted when parameter “sort_separately” has the value “entry_series”. Only non-empty entry series are counted.

A simple example of the usage of new features:

{exp:entries_list entry_series="15|45|19|89|75|69|12|78|41" date_format="%Y-%m-%d %h-%i %A" site="1"}
<a href="http://{weblog_url}{url_title}/">{title}</a>, weblog_name: {weblog_name}, entries_list_entry_date: {entries_list_entry_date}, entries_list_entry_date2: {entries_list_entry_date date_format="%Y-%m-%d"}, entry_date: {entry_date}, entry_date3: {entry_date date_format="%Y-%m-%d"}, entry_id: {entry_id}, previous_entry_id: {previous_entry_id}, previous_entry_title: {previous_entry_title}, previous_entry_url_title: {previous_entry_url_title}, previous_entry_weblog_url: {previous_entry_weblog_url}, previous_entry_weblog_name: {previous_entry_weblog_name}, previous_entry_weblog_shortname: {previous_entry_weblog_shortname}, next_entry_id: {next_entry_id}, next_entry_title: {next_entry_title}, next_entry_url_title: {next_entry_url_title}, next_entry_weblog_url: {next_entry_weblog_url}, next_entry_weblog_name: {next_entry_weblog_name}, next_entry_weblog_shortname: {next_entry_weblog_shortname}


{/exp:entries_list}
       
Laisvunas's avatar
Laisvunas
879 posts
15 years ago
Laisvunas's avatar Laisvunas

A more complicated example of the usage of new features; {exp:entries_list} tag is used here together with {exp:seeries} tag of Seeries module:

{exp:seeries name_1="aaa" name_2="bbb" name_3="ccc" name_4="ddd" name_5="eee" name_6="fff" name_7="ggg" name_8="hhh" name_9="iii" name_10="kkk" name_11="lll" name_12="mmm"}
{exp:entries_list entry_series_1="{seeries_1}" entry_series_2="{seeries_2}" entry_series_3="{seeries_3}" entry_series_4="{seeries_4}" entry_series_5="{seeries_5}" entry_series_6="{seeries_6}" entry_series_7="{seeries_7}" entry_series_8="{seeries_8}" entry_series_9="{seeries_9}" entry_series_10="{seeries_10}" entry_series_11="{seeries_11}" entry_series_12="{seeries_12}" sort_separately="entry_series" count_start_on="entry_series_6|entry_series_7|entry_series_8|entry_series_9|entry_series_10" count_stop_before="entry_series_11|entry_series_12" date_format="%Y-%m-%d %h-%i %A" site="1" on_failure="tagdata" invalid_input="alert"}
<a href="http://{weblog_url}{url_title}/">{title}</a>, 

weblog_name: {weblog_name}, 

entries_list_entry_date2: {entries_list_entry_date date_format="%Y-%m-%d"}, 

entry_date: {entry_date}, 

entry_date3: {entry_date date_format="%Y-%m-%d"},

entry_id: {entry_id}, 

previous_entry_id: {previous_entry_id}, 

previous_entry_title: {previous_entry_title}, 

previous_entry_url_title: {previous_entry_url_title}, 

previous_entry_weblog_url: {previous_entry_weblog_url}, 

previous_entry_weblog_name: {previous_entry_weblog_name}, 

previous_entry_weblog_shortname: {previous_entry_weblog_shortname}, 

next_entry_id: {next_entry_id}, 

next_entry_title: {next_entry_title}, 

next_entry_url_title: {next_entry_url_title}, 

next_entry_weblog_url: {next_entry_weblog_url}, 

next_entry_weblog_name: {next_entry_weblog_name}, 

next_entry_weblog_shortname: {next_entry_weblog_shortname}, 

entries_list_separate_count: {entries_list_separate_count}, 

entries_list_entry_series_count: {entries_list_entry_series_count}, 

next_entry_entry_series_count: {next_entry_entry_series_count}, 

previous_entry_entry_series_count: {previous_entry_entry_series_count}, 

entries_list_entry_series_count_total: {entries_list_entry_series_count_total}, 

entries_list_sort_separately_iteration:{entries_list_sort_separately_iteration}

<hr>
{/exp:entries_list}
{/exp:seeries}
       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah

Hi:

Thanks for a great set of plugins! I am trying to use this plugin to customize my previous and next navigation links but not sure how to do it. I have created a weblog to hold entries for client content - so each client entry is assigned a specific category and author name. I am trying to design the previous and next nav to show only posts for each client ( when the client logs into their page). currently, it shows entries for ALL clients even on a page for a logged in client. how can i modify the code below to show only client specific entries?

{exp:weblog:prev_entry weblog="{my_weblog}"}
                    <span class="preventry"><a href="http://{path={my_template_group}/article}">{title}</a></span>
                    {/exp:weblog:prev_entry}   |  

                    {exp:weblog:next_entry weblog="{my_weblog}"}
                    <span class="nextentry"><a href="http://{path={my_template_group}/article}">{title}</a></span> 
                    {/exp:weblog:next_entry}
       
Laisvunas's avatar
Laisvunas
879 posts
15 years ago
Laisvunas's avatar Laisvunas

To do previous/next linking using Entries List plugin you should use the code as this:

{exp:entries_list category="6" weblog="my_weblog" entry_id="2" sort="asc" site="1"}
<a href="http://{weblog_url}{url_title}/">{title}</a>, entry_id: {entry_id}, previous_entry_id: {previous_entry_id}, previous_entry_title: {previous_entry_title}, previous_entry_url_title: {previous_entry_url_title}, previous_entry_weblog_url: {previous_entry_weblog_url}, next_entry_id: {next_entry_id}, next_entry_title: {next_entry_title}, next_entry_url_title: {next_entry_url_title}, next_entry_weblog_url: {next_entry_weblog_url}


{/exp:entries_list}
       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
To do previous/next linking using Entries List plugin you should use the code as this:
{exp:entries_list category="6" weblog="my_weblog" entry_id="2" sort="asc" site="1"}
<a href="http://{weblog_url}{url_title}/">{title}</a>, entry_id: {entry_id}, previous_entry_id: {previous_entry_id}, previous_entry_title: {previous_entry_title}, previous_entry_url_title: {previous_entry_url_title}, previous_entry_weblog_url: {previous_entry_weblog_url}, next_entry_id: {next_entry_id}, next_entry_title: {next_entry_title}, next_entry_url_title: {next_entry_url_title}, next_entry_weblog_url: {next_entry_weblog_url}


{/exp:entries_list}

OK - i am sure I am missing something here.. i copied the code above and only changed the category number to the clients category - nothing. I get a print out of the raw code - no links. Am i supposed to embed this in another tag?

And also, I am trying to show the pagination links for each client - this this method limit the entries to each client category? I am sure i need to dynamically assign the category to do that. What does the entry_id=2 do?

       
First 2 3 4 5 6

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.