toto icon indicating copy to clipboard operation
toto copied to clipboard

More control over titles

Open ghost opened this issue 15 years ago • 6 comments
trafficstars

Can we have an option to attach the site title to all the page titles. So default title would be "MySite" and then when you go to an article page it would be something like "MySite - Some Article Title". Is this possible now?

ghost avatar Feb 06 '10 01:02 ghost

Ok, found a simple way to do it right now. Here's the code for the above example:

 MySiteTitle MySiteTitle - 

ghost avatar Feb 06 '10 18:02 ghost

Ok, above solution isn't going to serve proper titles for pages. Here's a better one:


  MySite

  MySite - 

  MySite - 

The second condition checks if the page is an article. A bit of a hack but works.

ghost avatar Feb 06 '10 19:02 ghost

FWIW, here's the solution I came up with.

http://gist.github.com/300095

vertiginous avatar Feb 10 '10 07:02 vertiginous

ok, it's late. That didn't work at all. This is better.

http://gist.github.com/300095

vertiginous avatar Feb 10 '10 07:02 vertiginous

I want to put my vote in for making this easier, as well.

davejacobs avatar Mar 24 '10 02:03 davejacobs

Here's my solution:

https://github.com/ixti/toto/commit/0b9f701ec7ca116e2822682dad5ae198b1204395 https://github.com/ixti/toto/commit/d1b1adc85a65a28c517f94dc58e489775492fda5 https://github.com/ixti/toto/commit/0c513b4f6fa47fb2bdf3eb4ed0ab14beaea9b5fb

ixti avatar Sep 02 '11 00:09 ixti