Peter M Dodge Posted May 18, 2012 Share Posted May 18, 2012 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? 0 Quote Link to comment Share on other sites More sharing options...
durangod Posted May 18, 2012 Share Posted May 18, 2012 Are you talking about "Portal Home" Text? If so would it be easier for you to just change the text in the lang file to something else more appealing? 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 18, 2012 Author Share Posted May 18, 2012 I'd rather just cut it (if possible), it duplicates what's in the breadcrumbs in most templates. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted May 19, 2012 Share Posted May 19, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 19, 2012 Author Share Posted May 19, 2012 (edited) Okay I should maybe be a little more specific, I apologise: I want to remove it on the index, but not on other pages. So something like "if !homepage { <header code> }" but Im not sure exactly what I'm putting there. Edited May 19, 2012 by Peter M Dodge 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted May 19, 2012 Share Posted May 19, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 19, 2012 Author Share Posted May 19, 2012 Aha! Thanks, I was basically missing what condition to test for with that 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted May 20, 2012 Share Posted May 20, 2012 (edited) 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 May 20, 2012 by disgruntled 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 20, 2012 Author Share Posted May 20, 2012 I'll have to play with that idea because it would certainly help with SEO. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted May 20, 2012 Share Posted May 20, 2012 Note the "neq" This is the smarty equivalent of != or <> meaning "not equal to" Good job 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted May 20, 2012 Share Posted May 20, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted May 20, 2012 Share Posted May 20, 2012 Good job 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 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted May 20, 2012 Share Posted May 20, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted May 20, 2012 Share Posted May 20, 2012 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). 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 20, 2012 Author Share Posted May 20, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
dclune Posted October 29, 2013 Share Posted October 29, 2013 <title>{if $kbarticle.title}{$kbarticle.title} - {/if}{if $filename neq "index"}{$pagetitle} - {/if}{$companyname}</title> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.