Re: Question on conditional statement




<sheldonlg> wrote in message
news:MpCdncmETK_cHrPUnZ2dnUVZ_rDinZ2d@xxxxxxxxxxxxxxx
Tim Roberts wrote:
rbaulbin@xxxxxxxxxxx wrote:
If anyone could field the following question, I'd greatly appreciate
it:

This seems to be a simple question, but for some reason it's not
working in the code I'm working with...
I'm very new to PHP...

I'd like to simply test whether or not the current web page is the
home page, and then execute one line of code, such as <div
class=class1>; if not, execute <div class=class2>. I've tried various
incarnations of is_home(), but the page displays nothing. Can anyone
shoot me some code that will work? :)

What, precisely, do you mean by "home page"? In my view, a "home page"
is
the default page for a site, so you'd just put your line of code in
"index.php".

I think he means the home page for the browser, not the site.

It's a google grouper. I don't think we will ever find out.


.



Relevant Pages

  • Re: Event Matchmaker updated
    ... > "contact us" one for some reason. ... > actually cover your logo to the point that the logo isn't visible. ... > being resized by the browser. ... > - The FAQ pages don't look anything like any FAQ I've ever seen, ...
    (rec.juggling)
  • Re: onresize wakeup call in older FF
    ... These are people who have lived with this browser, ... arbitrary user of a current browser to upgrade, ... a false reason for a user of a long time obsolete browser. ... the desired functionality with a window.setInterval, ...
    (comp.lang.javascript)
  • Re: Making a client side script Server Side
    ... that just talks to the browser and somehow _accurately_ ... get the time from the server the site is on. ... you can try and act like you have a reason to attack me. ... Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers ...
    (comp.lang.javascript)
  • Re: Save ASPX page on client programmatically
    ... who don't know THAT and HOW they can save a page displayed in their browser. ... reason 2: I am programming this for a customer and he WANTS the save-button. ... "Norman Yuan" wrote: ... want him to save the exactly same page as download via a "Save" button. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: CSS positioning issues
    ... Or is it that you refuse to dignify any as a reason? ... at a browser width of, say, 800px, that has a *bit* of variation at say, ... Can't help there; not using Windows. ... Mac, so you wouldn't see it more than once. ...
    (comp.infosystems.www.authoring.html)