Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Ajax rotating article excerpt
Hello all,
Here’s a quick rundown of what I’m trying to do.
I’d like to have a rotating article excerpt that uses AJAX.
Essentially it would be like a slideshow but instead of just images it would rotate chunks of HTML.
It’s sort of like using sort=“rand()” but it would reload the results on a specified time interval without reloading the page.
Anyone done anything like this?
Any direction would be appreciated.
—
Tom
Offline
Re: Ajax rotating article excerpt
Maybe you can do this not necessarily using AJAX but using some simple javascript (using jQuery this should be easy).
That is, you won’t fetch article excerpts “ajaxly”. They will be in your HTML the first (and only) time you load it.
You will simple show/hide them.
Offline
Re: Ajax rotating article excerpt
Maniqui,
Hmm…interesting. Sounds like it would achieve the results I’m after.
Any suggestions on how to make it happen?
I’m pretty limited in my programming abilities…That is, I can take things apart and rework them pretty well…but not skilled enough to create from scratch.
- )
—
Tom
Offline
Re: Ajax rotating article excerpt
renobird wrote:
I’m pretty limited in my programming abilities…That is, I can take things apart and rework them pretty well…but not skilled enough to create from scratch.
I’m exactly like you :)
But let’s start from the basic: the content/HTML output you will need. Then, someone wiser than us will come with some JS magic to help.
1. You will need to output X article excerpts. <txp:article limit="X" form="excerpt" />
.
Offline
Re: Ajax rotating article excerpt
Sounds good.
<txp:article limit="X" form="excerpt" />
is exactly right.
I think the next step is to hide all but one of them, and then show/hide the rest on some time interval.
Offline
Re: Ajax rotating article excerpt
have a look at this for example…
Offline
Re: Ajax rotating article excerpt
Sven,
That is sweet! …and exactly what I was looking for.
I’ll give it a go tomorrow and report back.
Cheers Mate.
—
Tom
Offline
Pages: 1