solved Adding A Title To Home Page

derrickhand300
@derrickhand300
9 years ago
1,353 posts
Using site builder-How can I add
<title>MY HOME PAGE TITLE</title>
to my home page or root URL without having it used as the title for every page of my website? I think there maybe a
{if} if url is homepage.com show this title{/if}
Is there a way to write this and is the needed info in the datastore?
Thank you
updated by @derrickhand300: 12/22/16 11:55:59AM
michael
@michael
9 years ago
7,715 posts
you can use this function in a template if you want to set it dynamically:
{jrCore_page_title title="whatever you want as the page title here"}
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thanks Michael- where would I put this if "I WANTED IT TO ONLY ADD A TITLE TO THE HOME PAGE"
Seems like if I add it to Meta/header or Footer templates it will change every page of the website to that title (which gets me right back to where I am now)...if I add it as "TEMPLATE CODE" on the page in SITE BUILDER- it breaks the site ( turns it white)
blindmime
@blindmime
9 years ago
772 posts
I think something like this might work:
{if $current_url == "http://yourdomain.com"}if url is homepage.com show this title{/if}
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thank you Blindmime- I tried it in the meta.tpl and the header.tpl... cleared caches -integrity checks etc and still it adds no code when I view the source code for the page
michael
@michael
9 years ago
7,715 posts
Site Builder already has this option.
SITE BUILDER -> PAGE CONFIG -> PAGE SETTINGS -> PAGE TITLE.
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Yeah ..um..thats not working...for instance in the SITE BUILDER -> PAGE CONFIG -> PAGE SETTINGS -> PAGE TITLE it says "MY SITE NAME"....but nowhere in the source code for that page is there
<title> MY SITE NAME </title>
The ONLY way to get MY SITE NAME into the title tag of the source code is to add it to the meta template which of course changes every page title on the site to MY SITE NAME...
So for instance If my site is called WATERMELONS but I want to make a page called "HOW TO GROW CUCUMBERS"- the page is still going to be called and show up in the browser tab as WATERMELONS-making search engines think the topic of every page of the site is WATERMELONS..
updated by @derrickhand300: 08/19/15 10:43:51PM
michael
@michael
9 years ago
7,715 posts
Working for me here. That's the only thing that page title does.

If its not working for you check your meta.tpl file to see if you've made any changes to the title section.

The default title in meta.tpl of jrNingja looks like this:
<title>{$page_title|default:"`$default_title`"|capitalize} | {$_conf.jrCore_system_name}</title>
screenshot_title.png

derrickhand300
@derrickhand300
9 years ago
1,353 posts
Yes I was missing that code in the meta.tpl. Thanks
derrickhand300
@derrickhand300
9 years ago
1,353 posts
The reason it was removed is because if I add a title tag to an item detail page like this
<title>IRON ROUGHNECK IMPACT GLOVES</title>
it is automatically changed to this
<title>IRON ROUGHNECK IMPACT GLOVES</title>
<!-- BEGIN jrFavicon/favicon.tpl -->
<link rel="shortcut icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420.ico">
<link rel="apple-touch-icon-precomposed" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_57.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_72.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_114.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_120.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_144.png">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_152.png">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_96.png" sizes="96x96">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_195.png" sizes="195x195">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_228.png" sizes="228x228">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="http://roughneckcity.com/data/media/0/0/favicon_1434807420_144.png">

<!-- END jrFavicon/favicon.tpl -->

Then if you look at the source code for the page you have all that code repeated twice like this
<!-- BEGIN jrFavicon/favicon.tpl -->
<link rel="shortcut icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420.ico">
<link rel="apple-touch-icon-precomposed" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_57.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_72.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_114.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_120.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_144.png">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_152.png">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_96.png" sizes="96x96">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_195.png" sizes="195x195">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_228.png" sizes="228x228">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="http://roughneckcity.com/data/media/0/0/favicon_1434807420_144.png">

<!-- END jrFavicon/favicon.tpl -->
<!-- BEGIN jrFavicon/favicon.tpl -->
<link rel="shortcut icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420.ico">
<link rel="apple-touch-icon-precomposed" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_57.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_72.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_114.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_120.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_144.png">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_152.png">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_96.png" sizes="96x96">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_195.png" sizes="195x195">
<link rel="icon" href="http://roughneckcity.com/data/media/0/0/favicon_1434807420_228.png" sizes="228x228">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="http://roughneckcity.com/data/media/0/0/favicon_1434807420_144.png">

<!-- END jrFavicon/favicon.tpl -->
any ideas on how to stop that from happening?
michael
@michael
9 years ago
7,715 posts
How to stop it from happening depends totally on why its happening. Why its happening is probably related to the code at that point.

The output of {$page_title} is all of that? If it is, then its being set there by some other location. Have you used that {jrCore_page_title} function anywhere that would put all that stuff INTO your headers?

Seams weird that the jrFavicon stuff is getting in there twice. First thing to check is does it do the same thing when the skin is changed. If it does, then its a module issue, if not then its a skin issue.
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Yes- I have been struggling with it for a week
Its the result of a custom module I had a friend make for me that allows me to add code to the header of item detail pages which has been resulting in some great traffic to my site over the last 2 weeks...
It only repeats the favicon stuff when I add
<title> My Page Title</title>

using the custom module. So my work a round was to use the module to add the title tags to EVERY page of the site and delete the code
<title>{$page_title|default:"`$default_title`"|capitalize} | {$_conf.jrCore_system_name}</title>
from the meta.tpl
This way I was able to add a custom title to EVERY page of the site INCLUDING item detail pages...so AFTER I did this to EVERY page of the website I discovered after a few hours when I got to the last page to add the title tag to which was www.myhomepage.com It didnt work...worked on EVERY page except that one....which is why I started this post....now I am in the process of removing EVERY title tag I added using the module and reverting to adding the titles using the PAGE CONFIG>SETTINGS....but now I cannot change titles on item detail pages beyond what the default is...:) follow all that? You can see the results the module is responsible for
Capture.JPG.jpg
Capture.JPG.jpg  •  53KB


updated by @derrickhand300: 08/20/15 12:30:44AM
derrickhand300
@derrickhand300
9 years ago
1,353 posts
For instance
I have a blog post titled
"Question Concerning Methane Gas Liquefaction At Formation Temperatures and Pressures "
which is a doozie if you want it as a browser tab... my preference using the custom module was to change the name to " Properties Of Methane" for better SEO and other reasons... BUT if I add
<title>Properties of Methane</title>
using the custom module all the favicon stuff is repeated twice in the source code...
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thinking about it further the point is really mute now because after adding that code snippet back to the meta.tpl I am stuck with that title as its the default now and cannot be overridden- all adding a new title does is put 2 different titles in the source code...not good....so ill just go with this-thanks for the help again

Tags