Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:44 am EST
Geeklog Forums
show only on main page
Status: offline
caio
Forum User
Newbie
Registered: 10/05/02
Posts: 10
hello everyone,
is there a way to make a piece of code appear only on the index (main, front) page (index.php)? i tried putting the code on the header template file but it shows on all pages. maybe there is some other file i could put it in... any suggestions?
thanks in advance!
is there a way to make a piece of code appear only on the index (main, front) page (index.php)? i tried putting the code on the header template file but it shows on all pages. maybe there is some other file i could put it in... any suggestions?
thanks in advance!
10
11
Quote
caio
Anonymous
great! so there is a way.
i assume with an if? not sure how it goes.
i'm still kind of lost.
could you give me an example?
thanks a lot Dirk! geeklog rocks!
i assume with an if? not sure how it goes.
i'm still kind of lost.
could you give me an example?
thanks a lot Dirk! geeklog rocks!
9
9
Quote
Status: offline
caio
Forum User
Newbie
Registered: 10/05/02
Posts: 10
Ok Dirk i think i managed to fabricate a bit of code for this BUT when I publish it, it tells me that com_onfrontpage (and com_isfrontpage) is an undefined function. and actually i couldn't find it in lib-common.php -- any help will be gREATLy appreciated! i am pulling my hairs out :doh:
this is what i tried :
<?php
if( !COM_isFrontpage() )
{
bla bla bla...
}
?>
but as I said, the function is nowhere in sight... :helpme:
this is what i tried :
Text Formatted Code
<?php
if( !COM_isFrontpage() )
{
bla bla bla...
}
?>
but as I said, the function is nowhere in sight... :helpme:
12
10
Quote
Status: offline
caio
Forum User
Newbie
Registered: 10/05/02
Posts: 10
ok i haven't gotten a reply for this yet but i managed to work it out by using a block with the option to show it only in the main page.... in case anyone goes through the same... it's an alternative... and it worked for me... :twocents:
8
11
Quote
All times are EST. The time is now 10:44 am.
- 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