I ain’t dead, just flat out busy. I’m working on a branding project at the moment, which I hope to write some more about. But here’s a tricky little problem that I was struggling with.
Our customer wanted to remove the ‘Help’ and ‘My sites’ links from the Global Links in the top right of the page (the Mysite link is going elsewhere on the page), so I removed these items from my new master page. I ended up with something like this:
I’ve highlighted the problem in yellow – a spurious trailing ‘|’ character which is being used as a seperator between links. I didn’t want this though! Looking at the code in my master page, though, showed that this link was being generated by a Delegate control:
Oookay. Not sure why the default value for this is coming from a delegate control, but there you go. Let’s have a look at the code for that delegate control:
Right, so the code is held in a control template -fair enough, let’s look in there:
There we go – a literal control. I have no idea what’s putting that separator character into the literal – and I don’t want to define my own delegate control to override the current delegate control.
So what to do? Well, simple answer – I copied the MyLinksMenuControl into my master page (but without any damn asp:Literal control). All this raises two questions though:
- Why are some of the Global links (though not all) rendered via Delegate controls?
- Who thought that rendering the control with a separator was a good idea?
All in all, it seems to be absurdly complex and highly effort-filled if you want to change anything here.
2 thoughts on “Remove a Separator Character from the Global Links”
I’ve been pulling my hair out with the same problem for all of yesterday. Just hoping that the next version of SharePoint allows easy access to and TOTAL control of the rendered output.
This is just another example of how MS drives front-end developers insane!
Aye, I couldn’t understand why someone thought the separator should be part of that control!