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.

Trying to place content on the home page only

November 09, 2010 10:56am

Subscribe [1]
  • #1 / Nov 09, 2010 10:56am

    metsgrrl

    22 posts

    I have an ad offer for my website that is requesting that the content only appear on the home page. I have an /index and I have a /comments and I’ve been placing homepage ads in the /index, and I’ve been solving this problem up until now by placing it on the /index page - not realizing that the index page just repeats itself for every main page of the site. Up until today, no one ever complained that their ads were on more than the home page (even people who specifically requested it) and I (stupidly) never thought about it much, either.  My right and left rail are both includes and also both appear on every page of the site. I don’t have a way to offer ad placement that is just on one page.

    Is there any EE tag or other variable I can put on the index page that says “only put this on the home page” or am I SOL unless I create a new template?

    [I should note that I hired someone to code this site and never made a separate home page part of the specification (although in my defense, they never asked, either) and that my knowledge of EE is on a need-to-know basis only.] What appears easy & simple to you is not for me - for whatever reason my brain has just never been able to learn EE (even though I know other CMS systems cold).

    the site is http://www.metsgrrl.com/

    Thanks in advance.

  • #2 / Nov 09, 2010 6:05pm

    Ingmar

    29245 posts

    Why not use a conditional?

    {if segment_1 == ""}
    This is the homepage.
    {/if}

    Something like that.

  • #3 / Nov 10, 2010 1:04pm

    metsgrrl

    22 posts

    EDITED:

    Fixed and it worked. And in the process I just taught myself about conditionals!

    The problem was that there was code that placed the different ads between different segments so without including an AND it was placing the ad in every location.

    Thank you!

  • #4 / Nov 10, 2010 5:43pm

    Ingmar

    29245 posts

    Very glad to see that helped. Post again as needed, please.

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

ExpressionEngine News!

#eecms, #events, #releases