AJAX links

In addition to the includes that contain a pagination mechanism, it is possible to specify links to be reloaded using AJAX by adding the CSS class ajax to those links.

  1. <a class="ajax" href="[(#URL_ARTICLE|parametre_url{tous,oui})]">Show all</a>

Example

  1. <INCLURE{fond=modeles/list_articles}{env}{ajax} />

The file modeles/list_articles.html:
Shows or hides the introduction to articles:

<ul>
<BOUCLE_art(ARTICLES){!par date}{0,5}>
	<li>#TITRE
		[(#ENV{afficher_introduction}|=={oui}|oui)
			<div>#INTRODUCTION</div>
		]
	</li>
</BOUCLE_art>
</ul>
[(#ENV{afficher_introduction}|=={oui}|oui)
	<a class="ajax" href="[(#SELF|parametre_url{afficher_introduction,''})]">Hide the introductions</a>
]
[(#ENV{afficher_introduction}|=={oui}|non)
	<a class="ajax" href="[(#SELF|parametre_url{afficher_introduction,oui})]">Show the introductions</a>
]

Author Mark Baber Published : Updated : 20/06/10

Translations : English, français