View Full Version : Almost there...Please help with IE layout & Title on Homepage
CharlesSA
Jan-04-2009, 03:10 AM
I tried figuring this out but I am going in circles. A search did not return an answer to my specific request, so hopefully one of you can help.
Page Title: My homepage currently reads "PageTitle + GalleryName". The Homepage seems to be called Galleries and I need to change it to say Homepage. On all my pages I got it to read "MyCustomPageTitle - GalleryName" WITHOUT the "powered by smugmug". What must I do so that only my sstart/homepage is renamed to "Homepage" from the current "Galleries"?
In FF the layout of my embedded Virtual Tour works fine, but in IE it is horrible. See this (http://www.active-exposure.co.za/gallery/6874980_6WutS)page to see what I mean. How do I fix this?Thanks for your help!
jfriend
Jan-04-2009, 09:05 AM
Sorry, but I don't understand your first question at all. Please provide a link and an exact description of what on that page is not what you want it to be.
I don't know why IE is misbehaving for your virtual tour page. It appears to not be picking up the width from the embedded flash show like Firefox is.
I was able to get IE to look right by manually specifying a bunch of widths with the following CSS:
.gallery_6874980 #journal {width: 840px;}
.gallery_6874980 #breadcrumb,
.gallery_6874980 #albumDescription,
.gallery_6874980 .journal_entry,
.gallery_6874980 .caption {width:800px;}
CharlesSA
Jan-04-2009, 10:43 AM
Sorry, but I don't understand your first question at all. Please provide a link and an exact description of what on that page is not what you want it to be.
I don't know why IE is misbehaving for your virtual tour page. It appears to not be picking up the width from the embedded flash show like Firefox is.
I was able to get IE to look right by manually specifying a bunch of widths with the following CSS:
.gallery_6874980 #journal {width: 840px;}
.gallery_6874980 #breadcrumb,
.gallery_6874980 #albumDescription,
.gallery_6874980 .journal_entry,
.gallery_6874980 .caption {width:800px;}
Fantastic, that immediately fixed my IE issue. Thanks John!
As for my first question, I will try to explain myself more clearly:
When you bookmark a given page on a website, the Page Title is what appears by default under the saved bookmark as the bookmark name. Now, initially the name that appeared on my website was the text I had written down in the "Page Title" field under Sitewide Customization, followed by the "powered by smugmug" suffix which was placed there by default. This was not exactly what I wanted, as I needed to remove the "powered by smugmug" text PLUS I wanted EACH INDIVIDUAL page to have its own custom name appear in the title. This is to make bookmarking or site navigation more efficient.
Now:
This string: [document.title = "document.title.replace(re1, "$1");] fixed all this for me by still RETAINING the text I entered found in the Page Title under site wide customization PLUS it ADDED the NAME of EACH INDIVIDUAL PAGE as a suffix which is cool. Hope this makes sense....
So, having come this far, the one last problem is that my hompage / or landing page is by default named "Galleries". I want to change that to say "Homepage" instead. The final result must then read: "Page Title (as found under sitewide customization) + Homepage". At the moment it is: "Page Title (as found under sitewide customization) + Galleries"
So in short, how do I change the name of my default landing page to another name?:wink New galleries are easy as it automtically uses the name I give to a gallery... but the homepage was there when I got my smugmug website and as such has this name "hard coded" somewhere.
I hope you can help.... not sure how else to explain it:scratch
jfriend
Jan-04-2009, 11:34 AM
Fantastic, that immediately fixed my IE issue. Thanks John!
As for my first question, I will try to explain myself more clearly:
When you bookmark a given page on a website, the Page Title is what appears by default under the saved bookmark as the bookmark name. Now, initially the name that appeared on my website was the text I had written down in the "Page Title" field under Sitewide Customization, followed by the "powered by smugmug" suffix which was placed there by default. This was not exactly what I wanted, as I needed to remove the "powered by smugmug" text PLUS I wanted EACH INDIVIDUAL page to have its own custom name appear in the title. This is to make bookmarking or site navigation more efficient.
Now:
This string: [document.title = "document.title.replace(re1, "$1");] fixed all this for me by still RETAINING the text I entered found in the Page Title under site wide customization PLUS it ADDED the NAME of EACH INDIVIDUAL PAGE as a suffix which is cool. Hope this makes sense....
So, having come this far, the one last problem is that my hompage / or landing page is by default named "Galleries". I want to change that to say "Homepage" instead. The final result must then read: "Page Title (as found under sitewide customization) + Homepage". At the moment it is: "Page Title (as found under sitewide customization) + Galleries"
So in short, how do I change the name of my default landing page to another name?:wink New galleries are easy as it automtically uses the name I give to a gallery... but the homepage was there when I got my smugmug website and as such has this name "hard coded" somewhere.
I hope you can help.... not sure how else to explain it:scratch
I'm starting to understand. But, your javascript for setting the document title is not working.
You have this in your Top Javascript and it's not a valid javascript statement.
document.title = "document.title.replace(re1, "$1");
I'm not sure where you got it from, but it looks like it needs to be part of a larger piece of javascript in order to be effective and this particular line has syntax errors in it. In your bottom javascript, you also have a ContextualizeTitle function that looks like it makes custom titles based on the page context which is called when the page is loaded. Are you asking to change the way that function works? What do you want your page title to be for your homepage?
Currently, it is "Professional Real Estate Photography / 360 Virtual Tours, Still Photography Services for Property for Sale / Johnannesburg: Porfolio Galleries.
This code has provisions for setting a siteTitle in the titleSettings declaration. Or, if you don't set one of those, it will use the default title in the page which comes from your "Page Title" field in your site-wide-customization.
CharlesSA
Jan-04-2009, 12:35 PM
Ok... you have me a bit confused now. Go to my actual start page (where the BIO is with the 3 images).
Phase one:
Goal: Have a custom Page Title
Action: I entered text in the "Page Title" field from Customization screen
Result = "My Custom Page Title Text" appeared on ALL pages on my site. So whether you click on packages, services...etc etc the same "Page Title" appeared on them all with no further distinction. I expected this behavior.
Phase two:
Goal: Now I wanted to get rid of "powered by smugmug"
Action: Added the java line and BINGO, "powered by smugmug" was removed. Tested in IE & FF and no more smugmug. So even though you say syntax is out... it is fulling its purpose??
BUT WAIT... it did MORE than that... since adding it keeps the text on the Page title the same as what I have written in my "Page Title" box under customization as expected, but on top of that it appends each individual pages name to the end. This I like!
E.g. 1. The "Contact" button on my Navbar takes me to my "Contact" page. Once there, look at the page title. It reads: "Professional Real Estate Photography / 360° Virtual Tours, Still Photography Services for Property For Sale / Johannesburg: Contact (before, it never add this last bit)
E.g. 2. Now go to "Services" on my Navbar. There, the Page Title reads: "Professional Real Estate Photography / 360° Virtual Tours, Still Photography Services for Property For Sale / Johannesburg: Services
Now, my homepage (the bio page) reads: "Professional Real Estate Photography / 360° Virtual Tours, Still Photography Services for Property For Sale / Johannesburg: Galleries . I want the last word changed to "Home" and not "Galleries "
Any ideas?
jfriend
Jan-04-2009, 12:53 PM
Ok... you have me a bit confused now. Go to my actual start page (where the BIO is with the 3 images).
Phase one:
Goal: Have a custom Page Title
Action: I entered text in the "Page Title" field from Customization screen
Result = "My Custom Page Title Text" appeared on ALL pages on my site. So whether you click on packages, services...etc etc the same "Page Title" appeared on them all with no further distinction. I expected this behavior.
Phase two:
Goal: Now I wanted to get rid of "powered by smugmug"
Action: Added the java line and BINGO, "powered by smugmug" was removed. Tested in IE & FF and no more smugmug. So even though you say syntax is out... it is fulling its purpose??
BUT WAIT... it did MORE than that... since adding it keeps the text on the Page title the same as what I have written in my "Page Title" box under customization as expected, but on top of that it appends each individual pages name to the end. This I like!
E.g. 1. The "Contact" button on my Navbar takes me to my "Contact" page. Once there, look at the page title. It reads: "Professional Real Estate Photography / 360° Virtual Tours, Still Photography Services for Property For Sale / Johannesburg: Contact (before, it never add this last bit)
E.g. 2. Now go to "Services" on my Navbar. There, the Page Title reads: "Professional Real Estate Photography / 360° Virtual Tours, Still Photography Services for Property For Sale / Johannesburg: Services
Now, my homepage (the bio page) reads: "Professional Real Estate Photography / 360° Virtual Tours, Still Photography Services for Property For Sale / Johannesburg: Galleries . I want the last word changed to "Home" and not "Galleries "
Any ideas?
Where did you get the ContextualizeTitle javascript from? It is that javascript that is adding the "Galleries" word onto the end.
Also, you should remove this line from your top javascript. It's just causing an error and not doing anything.
document.title = "document.title.replace(re1, "$1");
CharlesSA
Jan-04-2009, 01:25 PM
Where did you get the ContextualizeTitle javascript from? It is that javascript that is adding the "Galleries" word onto the end.
Also, you should remove this line from your top javascript. It's just causing an error and not doing anything.
document.title = "document.title.replace(re1, "$1");
Step 1: Removed "ContextualizeTitle" code from javascript.
Result: No more differentiation on pages I visit. If I go to "Packages" or "Services" I have the same page title. Also, now the "powered by smugmug" is back on each page..... this I do NOT want???
Step 2:
Action: Removed "document.title.replace(re1, "$1");[/quote]
Result: No effect - guess it was linked and dependent on the "ContextualizeTitle" code
Link to ContextualizeTitle code: HERE (http://www.dgrin.com/showthread.php?t=25861&page=12&highlight=ContextualizeTitle+Settings)
Link to "document.title.replace(re1, "$1"); post: HERE (http://www.dgrin.com/showthread.php?t=25861&page=5) (2nd to last post on page)
So John, now I am back to square one. What code do you suggest that will give me the following required outcomes:
For each PageTitle on all the pages on my site, I want "powered by smugmug" REMOVED.
Each "Page Title" for each link/page/gallery must still use the text from my "Page Title" under customization field (as it is currently doing, but minus smugmug thingy) PLUS , I want the last bit unique to each page added to the Page Title so that there is a bit of differentiation. This is so that each page can be differentiated in bookmarks etc. Make sense??Look forward to your suggestion.
Thanks for your time so far!!
jfriend
Jan-04-2009, 01:31 PM
Step 1: Removed "ContextualizeTitle" code from javascript.
Result: No more differentiation on pages I visit. If I go to "Packages" or "Services" I have the same page title. Also, now the "powered by smugmug" is back on each page..... this I do NOT want???
Step 2:
Action: Removed "document.title.replace(re1, "$1"); Result: No effect - guess it was linked and dependent on the "ContextualizeTitle" code
Link to ContextualizeTitle code: HERE (http://www.dgrin.com/showthread.php?t=25861&page=12&highlight=ContextualizeTitle+Settings)
Link to "document.title.replace(re1, "$1"); post: HERE (http://www.dgrin.com/showthread.php?t=25861&page=5) (2nd to last post on page)
So John, now I am back to square one. What code do you suggest that will give me the following required outcomes:
For each PageTitle on all the pages on my site, I want "powered by smugmug" REMOVED.
Each "Page Title" for each link/page/gallery must still use the text from my "Page Title" under customization field (as it is currently doing, but minus smugmug thingy) PLUS , I want the last bit unique to each page added to the Page Title so that there is a bit of differentiation. This is so that each page can be differentiated in bookmarks etc. Make sense??Look forward to your suggestion.
Thanks for your time so far!![/quote]
I believe you want the ContextualizeTitle code. It is doing 98% of what you want (giving you a unique title for every gallery page). I asked where you got it because that's probably the best way to find out how to get it to do the last 2% that you want.
The other line of code that I asked you to remove was not doing anything. It's bad syntax and can never do anything. It looks like it was part of a different scheme for settings titles, but you only have part of that code. I've looked at the ContextualizeTitle code and the two have nothing to do with one another.
If I were you, I'd put the ContextualizeTitle code back and see if you can answer my original question about where you got it from and who wrote it so we can see about asking the author how to get it to do the last 2%. If that runs into a brickwall, I can figure out how to modify it to change that one word on your homepage, but I can't do that right now as I have to run out for awhile.
CharlesSA
Jan-04-2009, 09:59 PM
If I were you, I'd put the ContextualizeTitle code back and see if you can answer my original question about where you got it from and who wrote it so we can see about asking the author how to get it to do the last 2%. If that runs into a brickwall, I can figure out how to modify it to change that one word on your homepage, but I can't do that right now as I have to run out for awhile.
Thanks John. If you look at my reply, you will notice I provided a link to each of the posts where I found the applicable code.
Here it is again:
Link to ContextualizeTitle code: HERE (http://www.dgrin.com/showthread.php?t=25861&page=12&highlight=ContextualizeTitle+Settings)
Link to "document.title.replace(re1, "$1"); post: HERE (http://www.dgrin.com/showthread.php?t=25861&page=5) (2nd to last post on page)
Here is what happens when I do the following steps incrementally.
Re-inserted the ContextualizeTitle code under bottom JavaScript. and then updated page. RESULT: You are right... it works AND removes the powered by smugmug" portion.Ok, so I am 98% there again.
Still to achieve:
Change the name of my landing page from "Galleries" to "Home"
New request: Reverse the order of my Page title by FIRST showing the "page name" followed by "page title text"
e.g. Go from: "PageTitleText: Packages" TO "Packages: PageTitleText" See example of someone else that achieved this HERE (http://www.mattgeorge.me)John, I am very grateful for your input on this. I look forward to your suggestion from here onwards.
jfriend
Jan-04-2009, 10:14 PM
Thanks John. If you look at my reply, you will notice I provided a link to each of the posts where I found the applicable code.
Here it is again:
Link to ContextualizeTitle code: HERE (http://www.dgrin.com/showthread.php?t=25861&page=12&highlight=ContextualizeTitle+Settings)
Link to "document.title.replace(re1, "$1"); post: HERE (http://www.dgrin.com/showthread.php?t=25861&page=5) (2nd to last post on page)Here is what happens when I do the following steps incrementally.
Re-inserted the ContextualizeTitle code under bottom JavaScript. and then updated page. RESULT: You are right... it works AND removes the powered by smugmug" portion.Ok, so I am 98% there again.
Still to achieve:
Change the name of my landing page from "Galleries" to "Home"
New request: Reverse the order of my Page title by FIRST showing the "page name" followed by "page title text"
e.g. Go from: "PageTitleText: Packages" TO "Packages: PageTitleText" See example of someone else that achieved this HERE (http://www.mattgeorge.me) John, I am very grateful for your input on this. I look forward to your suggestion from here onwards.
I missed those links in your previous post - sorry.
So, the ContextualizeTitle customization is code that was written by someone else and there's a thread where it's being discussed. I would suggest you post in that thread on your two questions and hopefully someone who has implemented this before can help you. That's generally how these complicated customizations are supported. As I read the code, it isn't written to do what you want on the homepage so it would have to be modified.
It has some functions built in for changing the order, but I can't tell whether they do what you want or not.
I wasn't able to see where there was a discussion of the "document.title.replace(re1, "$1"); code as your link on that seems to go to the same thread as the ContextualizeTitle discussion and the dgrin search won't find anything using those terms.
CharlesSA
Jan-04-2009, 11:00 PM
I missed those links in your previous post - sorry.
So, the ContextualizeTitle customization is code that was written by someone else and there's a thread where it's being discussed. I would suggest you post in that thread on your two questions and hopefully someone who has implemented this before can help you. That's generally how these complicated customizations are supported. As I read the code, it isn't written to do what you want on the homepage so it would have to be modified.
It has some functions built in for changing the order, but I can't tell whether they do what you want or not.
I wasn't able to see where there was a discussion of the "document.title.replace(re1, "$1"); code as your link on that seems to go to the same thread as the ContextualizeTitle discussion and the dgrin search won't find anything using those terms.
Thanks John. I will post in that specifc Post and see what they say. As for the discussion on "document.title.replace(re1, "$1");"... you are correct... it is in the same post. Just open the link and you will see it as the 2nd to last post. There is other code there as well.
You have been helpful and I just want to say thanks!!
jfriend
Jan-04-2009, 11:09 PM
Thanks John. I will post in that specifc Post and see what they say. As for the discussion on "document.title.replace(re1, "$1");"... you are correct... it is in the same post. Just open the link and you will see it as the 2nd to last post. There is other code there as well.
You have been helpful and I just want to say thanks!!
I finally found the reference to:
document.title.replace(re1, "$1");
My configuration shows a different number of messages per screen so I had to scan the whole thread to find it (it wasn't anywhere on the screen that your link shows for me).
This is not a stand-alone piece of code. It is someone's one line modification to a different version of the code than you have. It goes inside a different version of the ContextualizeTitle function than the one you have. It really has nothing to do with the code you have in your page now.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.