I am new to Sitecore and our team is building our first project using Sitecore. As I look through a lot of the tutorials, most of them use XSLT renderings. But I was wondering whether everything that can be done with XSLT can also be done through a Sublayout (e.g. rendering a collection of content)? If possible, I would like to avoid XSLTs for this project.
Thanks!
There are three main types of rendering technologies used with Sitecore. Together they fall under the "rendering" umbrella term. XSLT is quite unpopular as it is it's own language. WebControls and Sublayouts are similar but different approaches to almost the same thing. Both are implemented in C#.
HtmlTextWriter
s (IMO: "blah!")ascx
file and ascx.cs
CodeBehind to separate the front-end end from the back-end logic. This is just like a WebControl but separates the design and logic concerns to make it easy to write re-usable components. Any functionality can be created in these and its possible to build entire sites with just sublayouts (in addition to layouts).For Sitecore's official documentation on these technologies, they're explained in the Presentation Component Reference on the SDN under the section Choosing Presentation Technology.
My opinion: sublayouts are the way to go.
Everything that can be done in XSLT can be done in a SubLayout (which is just an ASCX or WebControl). There are in fact some things that are difficult to do in XSLT, and in fact are done better in a SubLayout.
The main reason to do XSLT is mostly for easy output. It's alot easier to output some HTML and display fields, but it is by no means required.
I've been using Sitecore for a year now, and I haven't found any problems where I had to use XSLT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With