1
rgauci
iFrame to show only on home page
  • 2010/5/27 10:28

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


I have put an iFrame code in my theme file to show on the home page. The iFrame is picking a scroller.php file which I created beforehand. Now I want this iFrame to show only in the home page and not in the other pages.

I have tried a custom block and put the scroller.php code in it and save the custom block as a php but is not coming up

Any ideas please how to make this work?
Be Set FREE!

2
kris_fr
Re: iFrame to show only on home page
  • 2010/5/27 11:22

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


hi,

<{if $smarty.server.PHP_SELF=='/index.php'}>myiframe<{/if}>

@+

3
rgauci
Re: iFrame to show only on home page
  • 2010/5/27 12:05

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


Hi kris_f

I am not sure where to put this piece of code.

is it in the scoller.php file anywhere the ''
or at the theme.html where I have put the iframe
''

Thanks for your help. I am not a php fan but I am learning from the xoops community a lot.
Be Set FREE!

4
kris_fr
Re: iFrame to show only on home page
  • 2010/5/27 12:11

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


Quote:
or at the theme.html where I have put the iframe
'

yes
<{if $smarty.server.PHP_SELF=='/index.php'}>
<
iframe src="http://www................... = "960px">
<{/if}>

5
rgauci
Re: iFrame to show only on home page
  • 2010/5/27 12:24

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


Thanks kris_F

Worked like a charm

Thanks again
Be Set FREE!

Login

Who's Online

313 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 313


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits