Author Topic: detect homepage  (Read 4638 times)

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
detect homepage
« on: May 11, 2016, 01:43:28 AM »
Is there any variable or function I can use to check if the page the user is viewing is the front page?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: detect homepage
« Reply #1 on: May 11, 2016, 05:49:29 AM »
do you mean case when $this->request->get['rt'] == 'index/home' or empty ?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: detect homepage
« Reply #2 on: May 11, 2016, 07:29:06 AM »
Let me clarify.

User is person managing store. So you ned to see if they are on the storefront side?
You can use:
Code: [Select]
if(IS_ADMIN === false) {
...
}
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline natdroid

  • Full Member
  • ***
  • Posts: 113
  • Karma: +36/-3
    • View Profile
Re: detect homepage
« Reply #3 on: May 11, 2016, 07:33:40 AM »
I need load code in header storfront homepage before all blocks load

 

Powered by SMFPacks Social Login Mod