Jump to content

Remove title from index.php?


Recommended Posts

Hey guys, been using WHMCS for a bit now, quite happy with it and most of the integration I've been able to handle by myself. Smarty is leagues beyond what many packages offer for templating and I'm quite happy with it.

 

However, I've reached a stumbling block. By it's nature index.php has a LITTLE more in it than just the page boilerplate templates, and I'm wondering how to remove the page title from the index, since it gets redundant with the breadcrumbs.

 

http://www.vtelectronics.net is the page.

 

I haven't edited the code for index.php but I see that the relevant code is NOT in /templates/portal/homepage.tpl

 

What would I edit to do so?

Link to comment
Share on other sites

Its in your header.tpl file:

 

<table border="0" cellspacing="1" cellpadding="4" class="category-border" style="width:950px; margin: 20px auto 0px auto; align: center;">
<tr>
<td colspan="5" class="category-inner">
<div>
<font style="font-size:14pt;"><b>{$pagetitle}</b></font>
</div>
</td>
</tr>
</table>

 

By the way, this isnt part of the default portal template, so its something you've added at some point.

Link to comment
Share on other sites

Here's the code you can use to remove it from the index page only:

 


{if $filename eq "index"}

<!-- display nothing here for the homepage  -->

{else}

code for pagetitle (shown on all pages other than the index page)

{/if}


 

Obviously you can remove the note, just wanted to show that anything added there will appear on the homepage.

Link to comment
Share on other sites

Here's the code you can use to remove it from the index page only:

 


{if $filename eq "index"}

<!-- display nothing here for the homepage  -->

{else}

code for pagetitle (shown on all pages other than the index page)

{/if}


 

Obviously you can remove the note, just wanted to show that anything added there will appear on the homepage.

 

Or for less coding option.

 

{if $filename neq "index"}

code for pagetitle (shown on all pages other than the index page)

{/if}

 

Note the "neq" This is the smarty equivalent of != or <> meaning "not equal to"

 

:) its only a few bytes saving, but its a few bytes that mount up on the memory usage.

 

 

You can also do similar for keyword and description meta tags. just add new elements to the lang file array.

 

name them keywords_filename desciption_filename (adjust the filename according to the correct page. you can then access the new values like this.

 

$lang.keywords_$filename

$lang.description_$filename

 

if i remember that correctly, play about you will get the idea. its good for making each page different in listings and not having a generic keyword and description set. SEO in a nutshell

Edited by disgruntled
Link to comment
Share on other sites

Just one point of interest, why is it that you want to take away the title anyway.

 

The title is what is used in a search engine as the link text.

 

if you take away the title your basically saying to google or others use my domain as the title. but your domain is already in the listing at the bottom, your wasting valuable space by forcing it to use just the domain.

Link to comment
Share on other sites

Good job :-P

 

I keep looking over your website, i am absolutely tempted to purchase from you. I love the idea of whmcs added pages. and the other things like easy changes in page layout and the such.

 

Do let me know if this plug will get me a discount.. probono? lmao

Link to comment
Share on other sites

Just one point of interest, why is it that you want to take away the title anyway.

 

The title is what is used in a search engine as the link text.

 

if you take away the title your basically saying to google or others use my domain as the title. but your domain is already in the listing at the bottom, your wasting valuable space by forcing it to use just the domain.

 

There's a lot of reasons for making edits like this such as removing duplicate content or changing the position of the page title etc

 

I keep looking over your website, i am absolutely tempted to purchase from you. I love the idea of whmcs added pages. and the other things like easy changes in page layout and the such.

 

That's great, I got your PM so will respond there instead of getting in the way of this thread.

Link to comment
Share on other sites

Just one point of interest, why is it that you want to take away the title anyway.

 

Its not actually a "title" or even a "header". Its just styled text wrapped in a <font> tag. search engines using titles (<title>FOO</title>) and headers (<H1>foo</H1> <H2>bar</H2>) for indexing more than they would just plain text wrapped in a font tag. Also, I believe the entire purpose of removing it from the index is because his homepage design already had the title in it (a header, actually).

Link to comment
Share on other sites

Duplicating text is a bad idea for two reasons, first of all, it makes the design visually confusing, secondly, it harms your site's goole ranking.

 

In pages which are subpages, it is visually clear that the breadcrumbs line is just that, and the stylised title text is the title. In the "root" homepage however, it's not, and it appears to just be a duplicated piece of text which makes the 'above the fold' content have less meaningful content on the home page. Since google's new algorithm actually looks at how much content is above-the-fold now, it was meaninfgul to me to try to cut down on the amount of 'header' to what's neccesary to make the design work both in accessibility and aesthetics.

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated