Author Topic: Targetable Homepage  (Read 316 times)


  • Jr. Member
  • **
  • Posts: 81
Targetable Homepage
« on: June 20, 2019, 14:05:34 pm »
What's the best way to target the homepage? (I have modules that I only want displaying on the homepage)

Previously I used the following MetaMod check:

Code: [Select]
if ( $vm->check( "pagetype = frontpage" ) )

but now the homepage is deprecated, this won't work (well, it still works, but it's not the correct approach). If as recommended I use a category for the homepage, I need to target it by ID which might change from site to site. Is there a definitive hook or anchor I can use that won't change?

I can't imagine you need version numbers, but I'm currently on VM3.4.2 on J3.9.6


  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2540
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Targetable Homepage
« Reply #1 on: June 20, 2019, 14:20:45 pm »
Assign what You call the "homepage", probably a VM top category page, to a Joomla menu item and use this menu id?

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)


  • Jr. Member
  • **
  • Posts: 81
Re: Targetable Homepage
« Reply #2 on: June 21, 2019, 10:51:58 am »
It still relies on me knowing (or looking up) an ID before I can target it.

I've decided to use an article instead because the home category was showing in my menu and I didn't want it to.