Welcome to Geeklog, Anonymous Monday, March 04 2024 @ 10:33 pm EST

Geeklog Forums

How to test in header whether site is on Home (ie front) Page?

Status: offline


Forum User
Registered: 11/24/21
Posts: 1
How can I test in the header.thtml (via PHP) whether the site is on the front page? I want to display an image, but only on the front page. I know I can do it in a static page centerblock, but that forces white space around the image. I want it flush against everything. If I place it in the header, it displays nicely, but on every page. I only want it on the front page.

Any ideas?

Status: offline


Site Admin
Registered: 09/27/05
Posts: 1468
Take a look at the Geeklog Caching Template Library Wiki page:


It shows how you can use logic in your template and how to access default template variables like


and how to use the built in logic like:

Text Formatted Code
{!if front_page}

<p>Place HTML here that will only show on front page</p>


One of the Geeklog Core Developers.

All times are EST. The time is now 10:33 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content