Jump to content


Photo

How do page titles even work anymore?


  • Please log in to reply
15 replies to this topic

#1 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 April 2012 - 12:00 PM

Hello.

Well...I finally upgraded my site from 2.2 and...I'm confused.

My site: hsdkfans.com (I know, it's empty. It's because I spend all my time on IPS instead of working on my site :lol: )

I spent 20 minutes with this and gave up and ended up cheating with

$this->registry->output->setTitle( );

I don't get it...this really needs to be more simple. My frontpage is index.html and in it I've got {parse articles}. The Page Name is "HSDK Fans". The page title is "History's Strongest Disciple Kenichi Fans". I think it's expected that since I have filled out the page title box that that will be the page title. However, I have parse articles so I can understand why this isn't the case, but watch what happens to my page title when I remove my cheat.

"HSDK Fans - History's Strongest Disciple Kenichi Fans - HSDK Fans"

Ok ok..so what are we doing here? The first "HSDK Fans" is the article title set in the articles configuration. The part in the middle is my page title, but what is the last part coming from? This is on the front page...so it's not my category or anything (and I don't even have a category named HSDK Fans).

So now lets take a peek into the documentation on this...and we find this.

Ok so articles are technically databases, but this really isn't ideal. The majority of us don't want such a complicated frontpage name. We just want the frontpage to be the name of our site. So, my suggestion is basically this.

In basic settings the page that we designate as our default home page should have some kind of special overrides so that databases do not mess with the title of the page and instead we can choose it in the page settings. Just for the frontpage, or as that documentation article says, the Index page. I know that I can use my cheat or use that one hook, but I'm trying to keep this simple for a large variety of people. I really don't think most people want such a complicated title as their frontpage rather they want something simple so that when they google mysite.com the title they see is "My Site" not "My Article Database Title - My Page Title - My Site".

Hope I explained that right...it made sense in my head.

P.S.
$this->registry->output->setTitle( ); is my new favorite toy. Never remove it.

#2 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,204 posts

Posted 19 April 2012 - 12:12 PM

Hello.

Well...I finally upgraded my site from 2.2 and...I'm confused.

My site: hsdkfans.com (I know, it's empty. It's because I spend all my time on IPS instead of working on my site :lol: )

I spent 20 minutes with this and gave up and ended up cheating with

$this->registry->output->setTitle( );

I don't get it...this really needs to be more simple. My frontpage is index.html and in it I've got {parse articles}. The Page Name is "HSDK Fans". The page title is "History's Strongest Disciple Kenichi Fans". I think it's expected that since I have filled out the page title box that that will be the page title. However, I have parse articles so I can understand why this isn't the case, but watch what happens to my page title when I remove my cheat.

"HSDK Fans - History's Strongest Disciple Kenichi Fans - HSDK Fans"

Ok ok..so what are we doing here? The first "HSDK Fans" is the article title set in the articles configuration. The part in the middle is my page title, but what is the last part coming from? This is on the front page...so it's not my category or anything (and I don't even have a category named HSDK Fans).

So now lets take a peek into the documentation on this...and we find this.

Ok so articles are technically databases, but this really isn't ideal. The majority of us don't want such a complicated frontpage name. We just want the frontpage to be the name of our site. So, my suggestion is basically this.

In basic settings the page that we designate as our default home page should have some kind of special overrides so that databases do not mess with the title of the page and instead we can choose it in the page settings. Just for the frontpage, or as that documentation article says, the Index page. I know that I can use my cheat or use that one hook, but I'm trying to keep this simple for a large variety of people. I really don't think most people want such a complicated title as their frontpage rather they want something simple so that when they google mysite.com the title they see is "My Site" not "My Article Database Title - My Page Title - My Site".

Hope I explained that right...it made sense in my head.

P.S.
$this->registry->output->setTitle( ); is my new favorite toy. Never remove it.

... i immediately add these lines to my conf_global.php
define( 'CCS_PAGE_TITLE_HOME', '{page_name}' );
define( 'CCS_PAGE_TITLE_CAT', '{page_name} - {category_name}' );
define( 'CCS_PAGE_TITLE_RECORD', '{page_name} - {category_name} - {record_name}' );
Cause I do not know what we are doing with the stock either.
I can see the site name/board name, and the page title... but I have NEVER understood the need for the database name as well.....
so I mangle it ;)
working on a hook to REALLY give control per page tbh... in structure using a similar "Template" system per page with the "second" method.
Defining a constant stock for the "index" pages couldn't be bad either.... hrmm.
  • civ and TaffyCaffy like this

#3 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 April 2012 - 12:17 PM

Yeah, I know Marcher, but I don't want to do that because I intend to add databases in the future and don't want to restrict it to that. I take it the hooks method will make it so that different databases can use different setups?

Anyway, I'll go hack up my conf_global.php right now. I looked at the articles and categories and didn't like those titles either...the stock solution is indeed not that great. Mine looks like this if anybody cares.

define( 'CCS_PAGE_TITLE_HOME', '{page_name}' );
define( 'CCS_PAGE_TITLE_CAT', '{category_name} - {website_name}' );
define( 'CCS_PAGE_TITLE_RECORD', '{record_name} - {website_name}' );

Anyone want to weigh in on the SEO issues with not including the category name in the record title? I generally don't care for SEO and just want nice looking titles, but I'm still interested in opinions.

#4 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,204 posts

Posted 19 April 2012 - 12:23 PM

Yeah, I know Marcher, but I don't want to do that because I intend to add databases in the future and don't want to restrict it to that. I take it the hooks method will make it so that different databases can use different setups?

Anyway, I'll go hack up my conf_global.php right now. I looked at the articles and categories and didn't like those titles either...the stock solution is indeed not that great. Mine looks like this if anybody cares.

define( 'CCS_PAGE_TITLE_HOME', '{page_name}' );
define( 'CCS_PAGE_TITLE_CAT', '{category_name} - {website_name}' );
define( 'CCS_PAGE_TITLE_RECORD', '{record_name} - {website_name}' );

Anyone want to weigh in on the SEO issues with not including the category name in the record title? I generally don't care for SEO and just want nice looking titles, but I'm still interested in opinions.

yes, the method i speak of would literally be defining that by page.
I would ideally like to add the fields to ccs_pages where the data is already just "there" but that table is beyond full... so I'm gonna have to run a different table. >_<
that and logo's by page/page and skin/website for IPC different is my current project as a 2-in-one hook.

#5 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 April 2012 - 12:26 PM

working on a hook to REALLY give control per page tbh... in structure using a similar "Template" system per page with the "second" method.
Defining a constant stock for the "index" pages couldn't be bad either.... hrmm.

Honestly, I was going to directly suggest this to you. :P

I was thinking an ACP extension of databases so that index, category, and record titles could be customizable by database based on database variables. Would be nice in stock actually.

But you're talking about doing it by pages in which case things get complicated when you introduce databases. After all when you click to each record you do want the title to change...so much thinking. The problem becomes that these kinds of settings can get too advanced for the average person..or too wordy.

#6 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,204 posts

Posted 19 April 2012 - 12:28 PM

Honestly, I was going to directly suggest this to you. :tongue:

I was thinking an ACP extension of databases so that index, category, and record titles could be customizable by database based on database variables. Would be nice in stock actually.

But you're talking about doing it by pages in which case things get complicated when you introduce databases. After all when you click to each record you do want the title to change...so much thinking. The problem becomes that these kinds of settings can get too advanced for the average person..or too wordy.

i said defining all 3 per page.
ergo, if you wont use a database, 2 fields are moot, but the option to change the whole structure of the titles by page is the only realistic way to do it right
otherwise you could not change the structure when there is NOT a database there separately.
or... hrmm
ok.
this sound sane?
define( 'CCS_PAGE_TITLE_HOME', '{page_name}' );
template defined by page.... as it really should be for shucks.... field page title... page title dangit.
this:
define( 'CCS_PAGE_TITLE_CAT', '{category_name} - {website_name}' );
define( 'CCS_PAGE_TITLE_RECORD', '{record_name} - {website_name}' );
template config is in the database configuration.... sounds more usable... right?

#7 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 April 2012 - 12:30 PM

Alright makes sense. That's basically what I'm looking for. Or at the bare minimum an improvement of how this works in the stock..such messy titles.
  • Marcher Technologies likes this

#8 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 April 2012 - 12:38 PM

Ok so maybe I should give you a five minute window before replying to your post because you always edit it with extra stuff. :P

The way you have it, is the way I have it too. I just think that way looks the nicest, but in the end everyone has their own opinion. But FYI I would use board_name instead of website_name since not everyone will have website_name filled in.

#9 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,204 posts

Posted 19 April 2012 - 12:39 PM

Ok so maybe I should give you a five minute window before replying to your post because you always edit it with extra stuff. :tongue:

The way you have it, is the way I have it too. I just think that way looks the nicest, but in the end everyone has their own opinion. But FYI I would use board_name instead of website_name since not everyone will have website_name filled in.

it was a copy-paste illustrating the proposed control structure.
the "default" if you don't change it would be the literal current default lol.

#10 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 April 2012 - 12:40 PM

it was a copy-paste illustrating the proposed control structure.
the "default" if you don't change it would be the literal current default lol.

No wonder I liked it so much lol.
  • Marcher Technologies likes this

#11 redfoster

redfoster

    IPB Newbie

  • +Clients
  • 10 posts

Posted 13 May 2012 - 11:27 PM

I've added this code to my conf_global.php in the forums root, but nothing has changed. My Ip.Content home page simply has the title 'Homepage.' Anyone know how I can change this? Thanks.

#12 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,204 posts

Posted 13 May 2012 - 11:34 PM

I've added this code to my conf_global.php in the forums root, but nothing has changed. My Ip.Content home page simply has the title 'Homepage.' Anyone know how I can change this? Thanks.

change the values.
is using the page "title" or name if no title supplied... it could be the website name only...
honestly, this global method is pretty inflexible.

#13 redfoster

redfoster

    IPB Newbie

  • +Clients
  • 10 posts

Posted 14 May 2012 - 11:33 PM

I've changed the values, but nothing seems to be changing. Should I also change the CCS_PAGE_TITLE_HOME value? And if so, to what? Thanks.

#14 Hafskjold

Hafskjold

    IPB Newbie

  • +Clients
  • 47 posts

Posted 17 July 2012 - 07:05 PM

Oh my god this was helpful. Thanks.

The stock URL's, especially with IP.Content installed are frakkin' horrible.

#15 Marcher Technologies

Marcher Technologies

    $life=FALSE;$code=TRUE;$time--;

  • +Clients
  • 11,204 posts

Posted 30 July 2012 - 08:37 AM

My answer, cause a constant is about as flexible as the nearest cliff for by-page tweaks(and so not obvious to the non-coders).
Make this, install it, and put in:
Database Index Title Format: {page_name}
Database Category Title Format: {page_name} - {category_name}
Database Record Title Format:  {page_name} - {record_name}
should be noted one can opt to use the constant, and then override them by page as needed.

#16 Joey_M

Joey_M

    Advanced Member

  • +Clients
  • 445 posts

Posted 28 November 2012 - 10:01 AM

I can't seem to get the structure which I'm trying to achieve.

Page Name: Home
Database Index Title Format: {page_name}, {website_name}

Database Category Title Format: {page_name}, {website_name}

Database Record Title Format: {website_name}
Page Title: Home

All I seem to get is 'Home,'

When viewing an article link I get 'Home [OFFLINE]'

I'm trying to make my index page

Home - Site Name
Page - Site Name
Article title - Site Name

I can't seem to get it to do this.


Some reason my browser seems to slow to make the changes.
 


http://www.ipbworks.com/

Highly recommend IPB Works for Skinning and Customizations.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users