Tag Archives: Usercontrol

Sitecore locating sublayouts on your webpage

This is a followup from the post, Get Sitecore placeholders and rendering hierarchy from a Sitecore item, where I adress one of the difficulties when working with pages in Sitecore, that they tend to get very complex as one page may … Continue reading

Posted in .net, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , , , , , | 5 Comments

Creating a tree like left menu in Sitecore using UserControls and C#

This post is a follow-up on the article on how to create a tree like left menu in Sitecore using XSLT. This time I will not use XSLT to create my left menu, but instead I will use C# and … Continue reading

Posted in c#, Sitecore 6 | Tagged , , , , , , , , , , | 5 Comments

Sitecore Language selector – creating a country selector

This is a little nifty thing I developed recently. I developed a small UserControl that displays all the flags from the languages in Sitecore, enabling me to create a list of clickable flags that will make the website switch language. … Continue reading

Posted in c#, General .NET, Sitecore 6 | Tagged , , , | 2 Comments

Using UserControls instead of XSLT in Sitecore projects

The use of XSLT in Sitecore have been around since Sitecore 4. XSLT’s are fast to write and easy to deploy: All you need to update an XSLT is to copy a new file to your web server. The nature … Continue reading

Posted in c#, General .NET, Sitecore 6 | Tagged , , , , , | 15 Comments

Get the Sitecore Sublayout from your .aspx page (Usercontrol)

How do you get the Sitecore Sublayout from a Usercontrol? A Sitecore Sublayout (Sitecore.Web.UI.WebControls.Sublayout) is a container for your Usercontrol (.ascx) page. Therefore the Sublayout is retrieved by typecasting the parent to a Sublayout: Having the Sublayout in hand enables … Continue reading

Posted in c#, General .NET, Sitecore 5, Sitecore 6 | Tagged , , , , | 5 Comments