• Hi all.
    I want a “welcome to ….” message on my frontpage. I have tried different sticky post solutions but do not feel comfortable with these as the look the same as other posts due to the CSS.
    I am now thinking about editing my index.php with an IF test to see if $cat have some value. If so=no welcome message.
    Basically, I want to check if index has any variables passed to it and if not, display my welcome message.
    What variables can be passed to index.php? What is the easiest way to check for this?
    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • One (maybe not the best) would be to check if the url ist the url of the document root (e.g. example.com) and then set the text. Or you use different templates and you hardcode it in the homepage template.
    $0.2
    Rene

    Another way is to add a js quicktag div and style it any which way in the CSS.

    Thread Starter Anonymous

    Thanks for the replies Rene and Root.
    How do I check for the url used in PHP? I think this is the best solution for me as I use several templates.
    Cheers!

    Thread Starter Anonymous

    Thanks mosie.
    I ended up doing it like this:
    $side=$_SERVER[‘PHP_SELF’];
    $variabel=count($_GET);
    if ($variabel==0 && $side==’/index.php’)
    {
    // Welcome message stuff
    }
    I had to do it like this because i needed to be sure that the page used was index.php AND that it was served “clean” (Hence the $_GET part).
    It now works as a dream.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘a check for a clean index query’ is closed to new replies.