Title Issue

Discussion in 'Programming' started by Brett Booker, Apr 11, 2013.

  1. #1
    I need help setting titles for my pages on my website. Here is what my code consists of. I will use about page as an example.
    <?php
    include_once "./shared/ez_sql_core.php";
    include_once "./mysql/ez_sql_mysql.php";
    require_once("./config.php");
    require 'h2o.php';
    $template = "templates/about.htm";
    $h2o = new h2o($template);
    echo $h2o->render();
    Code (markup):
    This connects to my .htm file that starts off like this
    {% extends 'master_page.htm' %}
     
    {% block content %}
    Code (markup):
    Then is a couple div tags that contain the content. Now inside my master template page is this line,
            {% if title %}
            <title>{{ title }}</title>
            {% else %}
            <title>Funny, Cheesy & Dirty Pick Up Lines</title>
            {% endif %}
    Code (markup):
    So pretty much every page has the same title this is an issue for SEO and etc. I would like to add I tried just to add new title to the about.php that connects to the other files but it drops the whole pages div tag layout. I hope I described this well.

    Thanks!
     
    Brett Booker, Apr 11, 2013 IP
  2. Brett Booker

    Brett Booker Greenhorn

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    8
    #2
    When I add new title tags to my php page it moves the banner down and makes it so it doesn't align with the back ground. Here is example http://postimg.org/image/tq7s8j3qp/.

    My website is http://www.PickUpPanda.Com

    Thanks!
     
    Brett Booker, Apr 11, 2013 IP
  3. Brett Booker

    Brett Booker Greenhorn

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    8
    #3
    No one needs to respond I fixed it myself with a little trial and error.
     
    Brett Booker, Apr 12, 2013 IP