Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: detect homepage  (Read 1847 times)

Offline natdroid

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +29/-2
    • View Profile
    • Contact
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: 1774
  • Karma: +246/-11
  • 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: 1600
  • 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

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +29/-2
    • View Profile
    • Contact
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