Techniqued- Technoloy, Review and Tutorials
  • Android
  • Freewares
  • Tutorial
  • Windows 11
  • macOS
No Result
View All Result
Techniqued- Technoloy, Review and Tutorials
  • Android
  • Freewares
  • Tutorial
  • Windows 11
  • macOS
No Result
View All Result
Techniqued- Technoloy, Review and Tutorials
No Result
View All Result

How to Check if the Current Page is Home/Front Page in Joomla

Nirmal by Nirmal
December 6, 2013
in Tutorial
3
Share on FacebookShare on Twitter

Joomla is a excellent content management software with lots of options to customize your website with themes and plugins. Sometime when you are designing websites using Joomla, you might want to implement a particular function or image or content only on the home page and not in the inside pages. The home page in Joomla is called Front page and you can easily check if the page is front page using the code below.

Joomla

To check if the current page is Front/Home page or not use the code below;

<?php if(JRequest::getVar(‘view’) == “frontpage” ) : ?>
<!– your home page code –>
<?php else : ?>
<!– your code –>
<?php endif; ?>

Apart from this, you can also use the default menu option to check the home page. If the menu is activated, the default item for menu would be home page.

<?php $menu = &JSite::getMenu();
if (JRequest::getInt(‘Itemid’) == $menu->getDefault()) : ?>
<!– your home page code –>
<?php else : ?>
<!– your code –>
<?php endif; ?>

You can use either one of the code to see if the user is viewing the home page or not. You can add these code to the template HTML file to display code based on the page.

Tags: Check Front PageJoomlaJoomla 1.5Joomla Front PageTipsTutorial
ShareTweetSendSend
Previous Post

Event Viewer for Windows

Next Post

Add Themes to Windows 7 Media Center

Related Posts

Tutorial

How to Use Snapchat on PC

May 21, 2024
iOS

How to Delete YouTube Search and Watch History on iPhone

May 18, 2024
Social Networks

How to Change your Name on Facebook [2024]

May 12, 2024
Social Networks

How to Hide likes on Facebook [Tutorial]

May 10, 2024
Tutorial

How to Download All Photos from Google Photos

December 21, 2023
Tutorial

How to Open a .SWF File with SWF Player

November 23, 2023

Comments 3

  1. aromatherapy says:
    14 years ago

    Gosh, I’ve been looking about this specific topic for about an hour, glad i found it in your website!

    Reply
  2. pakpenyo says:
    14 years ago

    Not work. The frontpage is same with menu blog category…..

    Reply
  3. Sabuj kundu aka manchumahara says:
    14 years ago

    here $menu->getDefault() is not int, but an object and will show error

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Latest Articles

How to Fix “Installation can’t continue” when trying to Update Nvidia Graphics Drivers

Download Windows 11 24H2 ISO (Offline Installer)

Can I Run Windows 11 without Activating

How to Use Snapchat on PC

How to Delete YouTube Search and Watch History on iPhone

How to Use Energy Saver on Windows 11

Techniqued- Technoloy, Review and Tutorials

© 2021 Techniqued - Technology, Tips, Tricks and Reviews

Navigate Site

  • About Us
  • Advertise with us
  • Contact Us
  • Copyright Policy
  • Disclaimer

Follow Us

No Result
View All Result
  • Android
  • Freewares
  • Tutorial
  • Windows 11
  • macOS

© 2021 Techniqued - Technology, Tips, Tricks and Reviews

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.