Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter
Powered by Vanilla. Made with Bootstrap.
Theme built by Kasper Kronborg Isager
Startpage slider of recent pages/news
  • asked by Arashk Rajabpour by e-mail

    hi fabian, how i can make slider with photo and discription for recent news or recent pages?
  • i would add a page thumbnail and a page date to each page (of a news category for example).
    Then on the startpage you could use the simple slider script from jQuery or Mootools and you use the[Implementation]/Feindura.html#createMenuByDate or[Implementation]/Feindura.html#listPagesByDate method to get all pages sorted by date from that category.
    if($feindura->startPage == $feindura->page) {
    // slider divs etc..
    // if you only need the thumbnail and the title i would use createMenuByDate() (its faster)
    // if you need the content or the description use listPagesByDate()
    // the 2 is the ID of the category you choose (the pages in there need to have a pagedate)
    foreach($feindura->listPagesByDate(true, false, 'category', 2, 100, false) as $page) {
    // echo other slider script divs etc...
    echo $page['thumbnail'];
    // echo text block divs...
    echo $page['title'];
    echo $page['description']; // or echo $page['content']; // which is shortened to 100 characters (see above)
    // slider closing divs etc..

    You can then use the $page['thumbnail'] to use as the picture and the $page['title'] or $page['description'] to use as text and place it, where the slider script needs it.

    hope that helps.