Forums / Cotonti / Extensions / Support / Show all tags

GHengeveld
#36074 2012-11-02 12:00

Try this:

<div id="relatedpages">&nbsp;</div>
<script type="text/javascript">
$(function(){
  $("#relatedpages").load("index.php?e=tags&a=pages&t=YOUR_TAG ol:first");
});
</script>

This should load a list of related pages into your page, based on the given tag. Replace YOUR_TAG above with the tag you want to use.

Note that this solution uses ajax to load the contents of the regular tags page into your page. The same could be achieved with PHP instead of Javascript, but that would require a plugin. Perhaps we can introduce a tpl callback function which mimicks jQuery's load() function, allowing you to do something like this:

{PHP|load("index.php?e=tags&a=pages&t=TAG", "ol:first")}

Actually, the above can probably already be achieved by using file_get_contents() as a callback, although that will give you the entire HTML page, not just a section of it:

{PHP|file_get_contents("http://www.google.com/")}