Jump to content

How to use page array, when foreach is not possible


joe_ma
 Share

Recommended Posts

Hello

I got a front page design consisting of a dozen of div elements. Some of them are containers for teasers, some are just decorations or ads or whatever. The problem I have is that the teaser blocks don't succeed each other:

- div 1 (title)

- div 2 (teaser)

- div3 (ads)

- div 4 (teaser)

- div 5 (teaser)

- div 6 (decoration)

… You get the idea.

The information for the teasers come from a page array ($teasers = $pages->find('selector')), no problem with that. But how can I scatter these to the teaser divs? I cannot use foreach to build divs that don's succeed each other, can I?

Any ideas on how to achieve this are welcome.
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...