Hi I'm in the process of setting up my portfolio, But as the images & content associated with the image are fairly large in size I want to load them dynamic on a page scroll, Kind of simliar to how Bing and Google images works.
I'm using Infinite Scroll jQuery plugin by Paul Irish, which i got working with a static html file, but can't figure out what to do for Umbraco.
Do I create an xslt file which displays all the content i want to show, and then somehow hook that into the plugin? A web service(heard somewhere in the forum that it might be needed), but I have no .net coding experience.
I've added in The script, and xslt i am currently using, if it helps.
<a href="{umbraco.library:NiceUrl(@id)}" class="btn fR"><xsl:value-of select="workLinkText" disable-output-escaping="yes"/></a> <a id="next" href="{umbraco.library:NiceUrl(@id)}">next page?</a><!-- this is need to call the next item using the plugin--> </section> </article>
From what I've read, I reckon all you need is some paging system in your macro (so it only shows x many items at a time) then just create an alternative template that retuns just the content. Then when you're JS requests the next page, it just gets the content for the page (minus the surround) and drops it in the container.
@Matt, I like what you are doing there, however i dont want actually want pagination, The idea is that the user only needs to scroll to load up the next item. I'll have a play with your example and try modify it to fit my needs.
Infinate paging though isn't that different to what I've done, the only thing different is that you don't get rid of the previous set of results. The logic and everything else behind it should be exactly the same.
1) Hit page show 10 results 2) Scroll to bottom, trigger load (essentialy like clicking the next button on my paging example), load next 10 results and append to bottom 3) Scroll to bottom, repeat previous step
Did you manage to make this work? I am now trying to do something similar with using Paul Irish's infinite scroll and showcasing some elements on scroll out of an alternative template. Unfortunatelly, it doesn't seem to be able to pass my URL.
I'd love to hear if you've found a solution for your situation.
Lazy loading images on scroll
Hi I'm in the process of setting up my portfolio, But as the images & content associated with the image are fairly large in size I want to load them dynamic on a page scroll, Kind of simliar to how Bing and Google images works.
I'm using Infinite Scroll jQuery plugin by Paul Irish, which i got working with a static html file, but can't figure out what to do for Umbraco.
Do I create an xslt file which displays all the content i want to show, and then somehow hook that into the plugin? A web service(heard somewhere in the forum that it might be needed), but I have no .net coding experience.
I've added in The script, and xslt i am currently using, if it helps.
The xslt: basically i have a docType called work which needs to display the items on a page scroll, the single items are kept in work-item
Hi Ivor,
From what I've read, I reckon all you need is some paging system in your macro (so it only shows x many items at a time) then just create an alternative template that retuns just the content. Then when you're JS requests the next page, it just gets the content for the page (minus the surround) and drops it in the container.
I did something similar on this site:
http://www.todd-white-art.com/art/editions.aspx
Not infinate scrolling, but similar idea, when you click the paging links, it loads the content dynamically rather than moving away.
Not a solid answer to your problem, but hopefully gives you a starting point, and by all means rip any source you need from that site.
Matt
HI Matt,
Thanks for the reply, your link you posted doesn't work though.
It works if you change .co.uk to .com
http://www.todd-white-art.com/art/editions.aspx
(nice work matt, is that search XSLT or Examine?)
Rich
Ooops, my bad, you are right, it's .com not .co.uk (I've updated the link in my original post).
@Rich - It's just XSLT based as it's Umbraco 4.0.x
Matt
@Rich thanks for that :P
@Matt, I like what you are doing there, however i dont want actually want pagination, The idea is that the user only needs to scroll to load up the next item. I'll have a play with your example and try modify it to fit my needs.
Hi Ivor,
Infinate paging though isn't that different to what I've done, the only thing different is that you don't get rid of the previous set of results. The logic and everything else behind it should be exactly the same.
1) Hit page show 10 results
2) Scroll to bottom, trigger load (essentialy like clicking the next button on my paging example), load next 10 results and append to bottom
3) Scroll to bottom, repeat previous step
Matt
Hi Matt,
This is how far I've got with the xslt. I got it from an old blogpost from www.nibble.be
How ever i just can't get it it to show any items on the page, any ideas?[sorry i'm still a toddler when it comes to xslt]
Hi Ivor,
Did you manage to make this work? I am now trying to do something similar with using Paul Irish's infinite scroll and showcasing some elements on scroll out of an alternative template. Unfortunatelly, it doesn't seem to be able to pass my URL.
I'd love to hear if you've found a solution for your situation.
Hi Julia.
If you have a solution about this(Lazy Loading), can you share with us? Thanks best regards.
is working on a reply...