The latest version of MetaMod (v2.6) for Joomla was released today, 29 November 2010.
All the changes are in the included JomGenius support. There are a few bugfixes and a few new features. The official release notes can be found here.
There are a couple of notable new features, in VirtueMart support:
1 - You can now check for a page type of "shop.registration" which is the page that people are sent to from the VirtueMart module, for new user registrations.
if ( $vm->check("pagetype = shop.registration" ) ) echo "On the registration page";
2 - You can now check to see if the product or category list being displayed descend from a particular category; i.e. whether a given category is an ancestor of the current product or category list.
This is useful if you want to use a different template (using MetaTemplate) or module (using MetaMod) for all products/categories that are in a top-level category.
Let’s say you have VM categories like this:
- Instruments (id 1)
- Woodwind (id 2)
- Brass (id 3)
- Orchestral (id 4)
- Brass Band (id 5)
- Strings (id 6)
- Orchestral (id 7)
- Guitars (id 8)
- Electric (id 9)
- Acoustic (id 10)
- Audio Equipment (id 11)
- Studio (id 12)
- Live (id 13)
Now, I want to display a certain module on every shop.browse page and shop.product_details page in the Strings section:
$vm = JomGenius( "virtuemart" );
if ( $vm->check("pagetype = shop.browse, shop.product_details" )
and $vm->check( "ancestor_category_ids = 6" ) ) return XXX;
// replace XXX with module ID to include on those pages.