Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Content Editor Web Part to Modify Top Nav

  Asked By: Vaughn    Date: Sep 29    Category: Sharepoint    Views: 1973

I have a subsite that I want to change the Up To link on in the
top nav bar. Right now it point to the site above it--I want it to
point to the portal. Trying to change that in the site settings simply
takes me to the top level admin. I think I should be able to do it
with the CEWP, but my optimism has outstripped my skills.

In the source code for the page, I found this:
<a id="onetidPortalConn" href="/sites/asite"><nobr>Up to A
which seems to be the reference I need to change. I copied it and
pasted it into the CEWP, which, of course, gave me a nice link in the
web zone with the CEWP. What do I need to do to change that link in
the nav bar?



1 Answer Found

Answer #1    Answered By: Tyron Calderon     Answered On: Sep 29

Insert this into the CEWP Source:

var portalConnection = document.getElementById("onetidPortalConn");
portalConnection.href = "{Portal URL}";
portalConnection.innerHTML = "<nobr>Up to {Portal Name}</nobr>";

Change {Portal URL} to the URL of your Portal
Change the {Portal Name} to the Name of your portal.

Then mark the Content Editor Webpart as hidden (so it doesn't take up space in your layout.)
You do this by un-checking the "visible on page" checkbox under the layout section of the toolbar

Didn't find what you were looking for? Find more on Content Editor Web Part to Modify Top Nav Or get search suggestion and latest updates.