Infinite Scroll
ExpressionEngine 1.x, ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Laisvunas
Getting Started Help
Support Request
Sneed's Feed & Seed
|
Posted: 30 October 2012 02:37 PM |
|
|
|
I’m having a little trouble getting going, can you point me in the right direction? I’m using Infinite Scroll on a Zoo Triggers category listing. Here’s my template code:
Main Template (URL: http://www.mysite.com/products/category/car-seats):
<div class="row"> <div class="ten columns"> {embed='ajax/products_scroll' category_id='{if triggers:segment_4}{triggers:cat_id_4}{if:else}{triggers:cat_id_3}{/if}' } </div><!--/.ten.columns--> </div><!--/.row-->
Embedded Template:
{exp:infinite_scroll:wrapper ajax_container='i-scroll' embed_template_url='{site_url}ajax/products_scroll' process_indicator='process_indicator' parse='inward' } {infinite_scroll_container_top} <ul class="block-grid two-up mobile cat-listing" id='i-scroll'> {/infinite_scroll_container_top}
{exp:channel:entries channel='products' dynamic='no' disable='categories|member_data' orderby='my_custom_Field' limit='6' category='{embed:category_id}' paginate='bottom' parse='inward' } {!-- Listing Item Code --}
{paginate} {if next_page} <div class="process_indicator"> Loading… </div> {exp:infinite_scroll:next_chunk_data}{auto_path}{/exp:infinite_scroll:next_chunk_data} {/if} {/paginate}
{/exp:channel:entries}
{infinite_scroll_container_bottom} </ul> {/infinite_scroll_container_bottom}
{/exp:infinite_scroll:wrapper}
Right now I’m just getting a blank template.
Also, I’ve never seen ‘parse=“inward”’ used on a module tag before, I thought it only worked on plugins?
|
|
|
Laisvunas
|
Posted: 30 October 2012 03:24 PM |
# 1
|
|
Developer
|
Hi,
parse="inward"
works both for plugins and modules.
To see if variables triggers:segment_4 and triggers:segment_3 were parsed correctly add this code on the top of embed template:
embed:category_id: [{embed:category_id}]<br><br>
|
|
|
Sneed's Feed & Seed
|
Posted: 30 October 2012 04:34 PM |
# 2
|
|
|
That was part of my problem, I was using the wrong segment numbers.
I actually realized that I probably don’t need to embed the category id as a variable, since the embedded channel entries tag can access the main page’s segments. So I updated my templates:
Main Page:
<div class="row"> <div class="ten columns"> {embed='ajax/products_scroll'} </div><!--/.ten.columns--> </div><!--/.row-->
Embedded Template:
{exp:infinite_scroll:wrapper ajax_container='i-scroll' embed_template_url='{site_url}ajax/products_scroll' process_indicator='process_indicator' parse='inward' } {infinite_scroll_container_top} <ul class="block-grid two-up mobile cat-listing" id='i-scroll'> {/infinite_scroll_container_top}
{exp:channel:entries channel='products' dynamic='no' disable='categories|member_data' orderby='my_custom_field' limit='6' paginate='bottom' parse='inward' {triggers:entries} } {!-- Listing Item Content --}
{paginate} {if next_page} <div class="process_indicator"> Loading… </div> {exp:infinite_scroll:next_chunk_data}{auto_path}{/exp:infinite_scroll:next_chunk_data} {/if} {/paginate}
{/exp:channel:entries}
{infinite_scroll_container_bottom} </ul> {/infinite_scroll_container_bottom}
{/exp:infinite_scroll:wrapper}
The first 6 products are displaying, but the “Loading…” indicator is fixed at the bottom and no new entries are being loaded.
|
|
|
Laisvunas
|
Posted: 31 October 2012 03:17 AM |
# 3
|
|
Developer
|
Hi Kristen,
What is being outputted by the variable {triggers:entries}?
|
|
|
Sneed's Feed & Seed
|
Posted: 31 October 2012 11:21 AM |
# 4
|
|
|
From the Zoo Triggers docs:
This global variable is used in {exp:channel:entries}, it will generate the necessary code for filtering your entries on categories, year/month and tags.
The point of ZT is to be able to output category listings using Structure URLs rather than EE’s native template-based URLs, which is what I’m doing. So if I didn’t have that {triggers:entries} variable, the {exp:channel:entries} tag would output every entry in the products channel because it wouldn’t recognize the extra URL segments as category filters. It’s really similar to Freebie, it just consolidates those commonly used functions into one module.
Make sense?
|
|
|
Sneed's Feed & Seed
|
Posted: 31 October 2012 02:49 PM |
# 5
|
|
|
One other thing I just noticed in the console:
Uncaught ReferenceError: infiniteScrollData1 is not defined
For the inserted javascript on this line near the bottom:
if (infiniteScrollData1.continuous_scroll_pagination_segment) { // there are data to scroll
|
|
|
noop46
|
Posted: 01 November 2012 11:37 AM |
# 6
|
|
|
Getting same thing. Using Solspace Super Search (doesn’t work with my channel entries either). Get first 6 results (from limit 6), with the loading process indicator showing, and that’s all. No results, no errors logged to console. No error messages. I ensured the keywords are being passed properly through the embed.
I also sometimes get the error in console:
Uncaught ReferenceError: infiniteScrollData1 is not defined
Initial template:
<ul id="moreContainer" class="row">
{embed="search/search_result_list_item_scroll" keywords="{super_search_keywords}"} </ul>
Embedded Template:
{exp:infinite_scroll:wrapper ajax_container="ajax_container" embed_template_url="{site_url}/search/search_results_list_item_scroll" process_indicator="process_indicator" parse="inward"}
{infinite_scroll_container_top} <div id="ajax_container"> {/infinite_scroll_container_top}
{embed:keywords} {exp:super_search:results paginate="bottom" keywords="{embed:keywords}" status="Open" limit="6" dynamic="off" } {title} <br>
{paginate} {if next_page} <div class="process_indicator"> Loading… </div>
{pagination_links} {next_page} {pagination_url} {exp:infinite_scroll:next_chunk_data}{pagination_url}{/exp:infinite_scroll:next_chunk_data} {/next_page} {/pagination_links}
{/if} {/paginate}
{/exp:super_search:results}
{infinite_scroll_container_bottom} </div><!-- End of # ajax_container --> {/infinite_scroll_container_bottom}
{/exp:infinite_scroll:wrapper}
Please advise, and thank you.
|
|
|
Laisvunas
|
Posted: 02 November 2012 04:39 AM |
# 7
|
|
Developer
|
Hi Kristen and Anthony,
Please, post URL of your main template here.
|
|
|
noop46
|
Posted: 02 November 2012 09:37 AM |
# 8
|
|
|
I emailed you details to saugos@gmail.com
|
|
|
Sneed's Feed & Seed
|
Posted: 02 November 2012 11:47 AM |
# 9
|
|
|
I also sent you an email via your expressionengine.com profile.
|
|
|
Guy
|
Posted: 11 December 2012 04:46 PM |
# 10
|
|
|
anthonycollini did you ever solve the Super Search/Infinite Scroll issue? I am trying to get it working with Super Search and not having luck at the moment.
|
|
|
Laisvunas
|
Posted: 15 December 2012 09:17 AM |
# 11
|
|
Developer
|
Hi Guy,
I would like to help you, but I don’t own a licence of Super Search add-on.
|
|
|
Guy
|
Posted: 17 December 2012 09:18 AM |
# 12
|
|
|
Thanks I’m still working through the issue. I’ve gotten it to work but still have a problem when a search is performed for an exact phrase - the quotes seem to cause an issue for Super Search. I think the Infinite Scroll portion is working as it should but I think Super Search may be having an issue with an exact phrase when the keywords parameter is used. Plan to work on it today so hopefully I’ll make some progress. Not sure if Solspace could grant any kind of testing license but that could be a possibility. Although I don’t think my issue at this point is an Infinite Scroll issue.
|
|
|
Bryan Lewis
|
Posted: 11 March 2014 01:50 PM |
# 13
|
|
|
Was there a solution to this? I’m experiencing exactly the same thing here. Not using solspace’s super-search and not geting console errors, but generally same exact code and same results: “Loading…” on the bottom.
|
|
|
Laisvunas
|
Posted: 14 March 2014 10:32 AM |
# 14
|
|
Developer
|
Hi Bryan,
Please, post here your template code. URL of your page wich outputs this error also would be helpful.
|
|
|
Bryan Lewis
|
Posted: 20 March 2014 11:23 AM |
# 15
|
|
|
I switched it to a different library that requires a click to load for now (some alpha test) BUT I will definitely be coming back to this in a week or so and will be able to revert and post my original code that uses your module at that time.
Thanks!
|
|
|