ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

navigation and EE conditionals

September 01, 2010 8:33am

Subscribe [3]
  • #1 / Sep 01, 2010 8:33am

    gguschke

    6 posts

    My client has two sites. Site A uses plain HTML, and Site B uses ExpressionEngine version 1.6.9.

    I’m looking for a way to hide a block of content only if a user navigates from Site A to Site B. If a user goes directly to Site B, the content block would show normally.


    Is there a way to do something like this in the head of Site B?

    {if user arrives from Site A}

    CSS code to hide the content block

    {/if}


    This is not code, obviously, it’s just a conceptual outline.

    I’ve found this support thread: http://ellislab.com/forums/viewthread/83097

    for this plugin: http://devot-ee.com/add-ons/cookie-plus/

    but Site A does not use EE.


    Thank you for reading.

  • #2 / Sep 01, 2010 2:01pm

    Carl W Crawley

    136 posts

    My thought would be to break in to PHP for this relatively easy task to be honest…

    something along the lines of

    <?php 
    if($_SERVER["HTTP_referer"] == "url/to/site/1")
    { 
    echo "Content you want to show to a referer";
    }
    else
    {
    echo "Content you want to show normally";
    }
    ?>

    Just make sure that you enable PHP in your template and that should be it.

  • #3 / Sep 01, 2010 6:10pm

    Brandon Jones

    5500 posts

    Thanks Carl!

    I believe there are also some add-ons over on Devot-ee that might work for you. Let us know if that helps, gguschke.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases