Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Allows you to search and sort many different archives/articles in Wolf CMS
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.textile
index.php

README.textile

Advanced Find plugin

This plugin enables you to sort/merge multiple pages trees in Wolf CMS.

Article considering setup and usage of this plugin can be found at Project 79

Installation

  1. download adv-find plugin and unpack it in “wolf/plugins/” folder
  2. go to administration→plugins and enable Advanced Find plugin

Usage

Example of your backend Pages:

Home Page
|- Category 1
| |- Article 1
| |- Article 2
| |- Article 3
|- Category 2
|- Article 4
|- Article 5

Followed by this line of code to sort them out.

<?php $articles = adv_find(array('/category-1/','/category-2/','/MORE CATEGORIES/'),array('order'=>'published_on DESC', 'limit'=>5)); ?>
<?php foreach ($articles as $article): ?>
<div id="article">
    <!-- OUR TITLE -->
        <h1><?php echo $article->link(); ?></h1>
    <!-- DAVIDS SINGLE PAGE TEASER -->
<?php if (($more_pos = strpos($article->content(), '<!--more-->')) === false ) {
        // "more" trigger NOT found, so just echo content
        echo $article->content();
} else {
        // "more" trigger IS found, so echo only teaser and add link to whole article
        echo substr($article->content(), 0, $more_pos);
        echo '</p><p class="readmore">'. $article->link('Read more . . .') .'</p>';
} ?>
</div>
<?php endforeach; ?>

NOTE: The limit of children cannot be less then 2!

Something went wrong with that request. Please try again.