How do you modify Sitefinity's breadcrumb control? - breadcrumbs

I need to modify sitefinity's breadcrumbs from this:
Home
to this:
Home >
So if the breadcrumb is on the root page, it needs to have the > after it.
Im an absolute beginner, so go easy on me! (using version 3.7)
Regards
Peter

I had a similar problem in the past and solved it by creating a custom user control with the breadcrumb control embedded within it. this allows you to add your own custom logic in the code behind to show or hide things as necessary:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>
<%# Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI" %>
<asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »
<sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />
here you can hide the BreadCrumb on the home page, showing the homepage hyperlink, which you can customize to show whatever you need.
There may be a better way to do this, but this was the fastest, easiest way I could figure out to do it.
hope this was helpful!

You can easily change the mockup separator. You need to edit the Breadcrumb, click on the advanced button and find the NodeSeparatorMarkup field.
In my case I've put >> instead of >
<span class='sfBreadcrumbNodeSeparator'>»</span>;

Related

GWT anchor to kick off new css class

Im building a nav menu and am struggling with something really simple here. In my UI binder i have this
<header class="{res.css.mainHeader}">
<a href="#{res.css.mainNav}" class="{res.css.openMenu}">
open
</a>
<a href="#" class="{res.css.closeMenu}">
close
</a>
<h1>new header</h1>
</header>
So when I write and test this in html, it works fine. you click on the word open, and everything animates, shows all the cool stuff, the world is a happy place. But i can't figure out how to translate this into GWT.
When I run the above code, I get this error
[WARN] [itrgwtprototype] - Escaping unsafe runtime String expression used for URI with UriUtils.fromString(). Use SafeUri instead: <a class='{res.css.openMenu}' href='#{res.css.mainNav}'> (:20)
But I have a sneaking suspicion that GWT has a better way to do it than SafeUri. How do i make this work? The CSS stuff is correct, but the anchor click is whats messed up.
thanks.
You are setting the anchor href property with a css value (href="#{res.css.mainNav}").
If you want to translate it entirely in GWT you should listen to ClickEvent on you open menu and then do something like open a panel or something else. In order to do so you can replace the anchor with a Label (or InlineLabel) and listen on click events on it.

Make sidebar floatable in Joomla

I have a website powered by Joomla 1.5.26 using template Ja Purity II
Demo template here
http://templates.joomlart.com/ja_purity_ii/
How can i make my right sidebar floatable ? I try to change it css position to absolute but it didnot work. Any one can help me !
You can remove the class column sidebar from index.php in templates files and can create you own class for right side bar.
<div style="width:20%" class="column sidebar" id="ja-right">
To
<div style="width:20%" class="column-your-css sidebar-your-css" id="ja-right-your-css">

Webapp homescreen title suggestion and jquery mobile

When user chooses "add to homescreen" option from mobile Safari she sees a dialog where she can enter title for that shortcut. The text field is already filled with some default title.
The question is: there this title is taken from?
In my code I have following header for one of my pages (all pages in single html file):
<div data-role="header" class="toolbar">
<h1 id="someHeader" class="exampleHeader">Example Header</h1>
Other
</div>
I'm changing this title dynamically by using
var someDifferentTitle = ...
$('.exampleHeader').html(someDifferentTitle).trigger('create');
The title updates just fine but when I tap "add to homescreen" the system still uses original "Example Header" hint!
How to fix this? Any ideas?
Answer here: https://stackoverflow.com/a/11569043/275754
Short answer:
<meta name="apple-mobile-web-app-title" content="Short name">
OK, it turned out to be very simple, one just needs to change document's title:
document.title = someDifferentTitle
I still have no idea why the hint is truncated after several characters, but that is kind of enough for me.
I think however that there is slight inconsistency in jQM implementation. If setting toolbar's header in h1 using code changes the document title then dynamic change of header via .html() method should change the title as well.

Trying to right justify "Like Us On Facebook Code" in Header

So I am trying to add the following "Like Us On Facebook" code in the header of my website and have it be right justified, while the Title & Description remain left justified. Here is the FB code:
<div class="fb-like-box" data-href="http://www.facebook.com/HowToForiPad" data-width="292" data-show-faces="false" data-stream="false" data-header="false"></div>
I'm not the most knowledgeable about this type of thing so I'd prefer not to mess with the CSS and have been just trying to drop the code above into the appropriate place in my header.php file. The tricky part (for me) is making the Facebook Like right aligned while the site title and description remain left aligned.
Here is an example of what I want it to look like (ignore the underscores...had to do it to make it look right)
WELCOME TO WHATEVER SITE
The site does blah blah________________________________________Like us on facebook
Here is the relevant code from the header.php:
<!-- HEADER -->
<div id="header">
<div class="website-name"><?php bloginfo('name'); ?></div>
<div class="slogan"><?php bloginfo('description'); ?></div>
</div>
<!-- /HEADER -->
So basically I'd like the Facebook code to be in line with the site description but right justified (whereas the site description is left justified).
Greatly appreciate any help!
Using CSS is pretty much your only option.
You can change the slogan div to a span (or set a width on the div), add the fb like box below this span and float it right. That should do what you need.
If you REALLY don't want to touch your CSS file, you can add the styles inline, but I don't recommend this as it is not best practice.

mvc renderpartial dialog difficulty

I have a view in which I have the following code:
<div id="DivPassword" >
<%Html.RenderPartial("PasswordDetails"); %>
I want to display the div as a dialog, in which I am successful. When I click on a link the dialog opens.
However, I can see that the partial view is also being displayed in the View, when the page loads. Why is it so? How can I correct that?
It displays because your code generates markup like:
<div id="DivPassword" ><!-- contents of partial view here --></div>
When a browser sees this markup, id displays stuff. :)
In order to not display the dialog until you run some JavaScript to make it display, you need to hide it. You can do this with a CSS rule:
div#DivPassword
{
visibility: hidden;
}
Pretty much all JS dialog libraries will change the visibility when you pop up the dialog.