Sometimes it is preferable to filter an interface dynamically instead of creating a new interface with similar settings.

The Interface can accept a language default option or a category filter based on variables declared just before the interface code.

This example shows how to force the interface to select a default language based on a javascript variable declared before the Interface is loaded.

 <script type="text/javascript">// <![CDATA[ var ml___lang='fr-CA%20(1)'; // ]]></script>
<script src="//code.metalocator.com/index.php?option=com_locator&amp;view=directory&amp;layout=_javascript&amp;framed=1&amp;format=raw&amp;tmpl=component&amp;no_html=1&amp;Itemid=YOURINTERFACEIDHERE"></script>

In this example, we declare an array of tags (a.k.a. categories) that should be used in the interface loaded below. This option contains the IDs of the Categories desired on this interface. This is a great option for filtering an interface to only show a certain subset of categories without creating new interfaces for each category.

 <script type="text/javascript">// <![CDATA[ var ml___tags = [1,2,4]; // ]]></script>
<script src="//code.metalocator.com/index.php?option=com_locator&amp;view=directory&amp;layout=_javascript&amp;framed=1&amp;format=raw&amp;tmpl=component&amp;no_html=1&amp;Itemid=YOURINTERFACEIDHERE"></script>
Did this answer your question?