Articles Anywhere
Demo for Filter via url ("input:") and for Pagination
Filter by Custom Field of type List (Session), not adapting styling
Tous Session 1 Session 2 Session 3
Filter by Custom Field of type List (Session), adapting styling
{source}
<?php
$session = explode(',', JFactory::getApplication()->input->getString('session'));
// echo (in_array('slot-am-1', $session) ? 'yes' : 'no');
// print_r ($session);
echo '<a class="btn btn-default" href="/articlesanywhere">Tous</a> ';
echo '<a class="btn btn-default' . (in_array('slot-am-1', $session) ? ' btn-primary' : '') . '" href="/articlesanywhere?session=slot-am-1">Session 1</a> ';
echo '<a class="btn btn-default' . (in_array('slot-am-2', $session) ? ' btn-primary' : '') . '" href="/articlesanywhere?session=slot-am-2">Session 2</a> ';
echo '<a class="btn btn-default' . (in_array('slot-am-3', $session) ? ' btn-primary' : '') . '" href="/articlesanywhere?session=slot-am-3">Session 3</a> ';
echo '<a class="btn btn-default' . '" href="/articlesanywhere?session=slot-am-1,slot-am-3">Sessions 1 & 3</a> ';
echo '<hr />';
$room= explode(',', JFactory::getApplication()->input->getString('room'));
// print_r ($room);
echo '<h4>Filter by Custom Field of type Articles Field (Room)</h4>';
echo '<a class="btn btn-default" href="/articlesanywhere">Toutes</a> ';
echo '<a class="btn btn-default' . (in_array(35, $room) ? ' btn-primary' : '') . '" href="/articlesanywhere?room=35">Amphithéatre PlanetHoster</a> ';
echo '<a class="btn btn-default' . (in_array(199, $room) ? ' btn-primary' : '') . '" href="/articlesanywhere?room=199">Salle Infomaniak</a> ';
echo '<a class="btn btn-default' . (in_array(200, $room) ? ' btn-primary' : '') . '" href="/articlesanywhere?room=200">Salle atelier</a> ';
echo '<hr />';
$jour= explode(',', JFactory::getApplication()->input->getString('jour'));
// print_r ($jour);
echo '<h4>Filter by Tag</h4>';
echo '<a class="btn btn-default" href="/articlesanywhere">Tous</a> ';
echo '<a class="btn btn-default' . (in_array('vendredi', $jour) ? ' btn-primary' : '') . '" href="/articlesanywhere?jour=vendredi">Vendredi</a> ';
echo '<a class="btn btn-default' . (in_array('samedi', $jour) ? ' btn-primary' : '') . '" href="/articlesanywhere?jour=samedi">Samedi</a> ';
echo '<a class="btn btn-default' . (in_array('test', $jour) ? ' btn-primary' : '') . '" href="/articlesanywhere?jour=test">Test</a> ';
echo '<hr />';
$date= explode(',', JFactory::getApplication()->input->getString('date'));
echo '<h4>Filter by Creation Date (possible to filter on yyyy-mm-dd or yyyy-mm or yyyy for example. But using >= in the filter is not foreseen</h4>';
echo '<a class="btn btn-default" href="/articlesanywhere">Tous</a> ';
echo '<a class="btn btn-default' . (in_array('2019-02-04', $date) ? ' btn-primary' : '') . '" href="/articlesanywhere?date=2019-02-04">2019-02-04</a> ';
echo '<a class="btn btn-default' . (in_array('2019-02', $date) ? ' btn-primary' : '') . '" href="/articlesanywhere?date=2019-02">2019-02</a> ';
echo '<hr />';
$page= explode(',', JFactory::getApplication()->input->getString('page'));
// print_r ($page);
echo '<h4>Example of text based on Pagination</h4>';
echo '<p>' . 'Is this page 2 or not : ' . (in_array('2', $page) ? 'yes' : 'no') . '</p>';
?>
{/source}
Journée Grands Débutants
session 1 AM (accueil)
Salle atelier
Keynote d'ouverture
session 2 AM
Amphithéatre PlanetHoster
Keynote d'ouverture
session 2 AM
Amphithéatre PlanetHoster
RGPD et mise en conformité : quels principaux enjeux juridiques
session 3 AM
Amphithéatre PlanetHoster
Joomla au coeur de la stratégie digitale de INNIO, société de 3 milliards d'euro
session 3 AM
Amphithéatre PlanetHoster
Overrides & custom fields ; réaliser ses propres templates d'articles
session 3 AM
Salle Infomaniak
Méthode / Outils / Organisation : Comment gérer son projet de manière optimale?
session 3 AM
Salle Infomaniak
Astroid : un framework et des outils intégrés
session 3 AM
Salle atelier
Le netlinking, un levier majeur pour être visible sur Google en 2019 ?
session 4 AM
Amphithéatre PlanetHoster
Les tendances UI/UX e-commerce - Bonnes pratiques pour réussir sa boutique en ligne
session 4 AM
Amphithéatre PlanetHoster
NB:
- the 9.3.2 version allows for multiple values for each parameter, like ?session=slot-am-1,slot-am-2
- in Articles Anywhere,
- a filter on a Custom Field of type List (like slot="slot-am-1") works
- a filter on a Custom Field of type Articles Field (like salle="salle-infomaniak" or salle="Salle Informaniak") does *not* work
But it *does* work on the ID as that is the 'value' !
- In order to style the buttons according to the active page
- if there is only one value at the time passed in the url for that parameter, see http://demo.webularlab.nl/cursussen?order=niveau
Example : <a class="btn knop2-{article}[input:order]{/article}" href="/cursussen?order=niveau">Niveau</a>
- if there are multiple values at the same time passed in the url for that parameter, then use the code used in the present article