What conditional statement would I use to so that a flash slideshow only shows up on the home page?
Something like:
<?php if (something) == (home page url) { ?>
<div flash>
....
</div>
<?php } ?>
Printable View
What conditional statement would I use to so that a flash slideshow only shows up on the home page?
Something like:
<?php if (something) == (home page url) { ?>
<div flash>
....
</div>
<?php } ?>
The principle is described in the comments of /includes/templates/your_template/common/tpl_main_page.php, along with examples.
Change the ...flag... line to refer to your flash, and it will only execute on the main page.PHP Code:
* // example to not display right column on main page when Always Show Categories is OFF
if ($current_page_base == 'index' and $cPath == '') {
$flag_disable_right = true;
}
The idea can be adapted to many different uses.
Okay I see where that line is, and I read the comments. Literally that means nothing useful to me. Do I copy and paste that line somewhere? Do I put something in between the ' ' ?? That code is as understandable to me as a foreign language. The more I read code stuff and explanations the more lost I'm getting.
Flash files are .swf right?? So I'd put the name of my .swf file somewhere in that line?
These questions may seem redundant but I honestly don't know heads from tails reading those lines. I wish I knew where to go to get a handle on understanding what I'm trying to read!!!
I don't know anything about flash files, but if you do know the code to run flash, you would replace the ...flag... line with whatever code you need (any number of lines.)
You would put the whole if (this is true...) {then do that...} statement in whatever location you wanted the code to execute.
P.S. - There are online tutorials that can give you a beginning overview of how PHP, CSS etc. work. A good one is www.w3schools.com.
I read that one! All the time! LOL !~!
I have them bookmarked and refer to them all the time to figure out what something is in my stylesheet. Still though for some reason most of this stuff is GREEK to me. I will keep playing with that code. I want a separate page (an ez page perhaps.. or something) and put a flash thing on it.