Hello all,
Well hopefully this will be a useful solution to the
Umbraco CMS community. I have worked on a
CSS style switcher that allows the user to change the look of your site with a
different CSS stylesheet. For example you may have two coloured themes that you
want your user to be able to decide which they want to use when browsing your
site.
This solution requires two files, a VB.NET usercontrol and an XSLT file.
The VB.NET file checks if the style querystring exists if so it
creates the cookie of StyleSwitch with the value from the
style querystring otherwise it sets a default value. If your
intrested take a look at the code in usercontrol, it is heavily commented and
should be easy to understand.
The XSLT does the important part of loading the correct stylesheet depending on
the cookie value. Using an XSL:Choose statement with the
umbraco.library we are able to read the cookie value and load
diffferent stylesheets depending on the cookie value.
This solution is very flexible as it is also possible to load in different
JavaScript files as well to compliment the CSS stylesheets. For example I plan
to use this style switcher in a future release of my
Creative
Website Wizard Package for Umbraco to load in different layouts and themes.
However just simply changing the CSS will not change the font colour used in
sIFR3
as this is set with a JavaScript config file. So I will need to load a new
JavaScript file along with the CSS file when doing the theme switches.
Hello all,
This blog post is for my own reference mainly for a technique I have read and
learnt about. What I was looking for was to be able to style alternative rows a
different colour, similar to the popular layout of iTunes where the row colour
alternates between dark and light blue.
I wanted to be able to achieve this affect easily without having to add Classes
to my table for each different row manually, I wanted this to be automatic so it
can be used in CMS systems without the end user having to ammend the HTML code
on the table. I know that in the future we will not have to use JavaScript to
help us do this as the new CSS3 selectors will allow us to do this.
This is the CSS rule that will be used in the future and will obviously style
all odd table rows with the background colour red.
Hello all,
After getting back from NY and settling back in, I have read all of your
comments in regards to my
website package I have
released a fix to the XSLT search people are having and I have updated the XHTML
and CSS so that the logo goes to the homepage as suggested by Lars Buur.
I am not sure if this work by reinstalling the package over the top - it is
unlikely, but please do let me know.
Hello all,
It’s been a while since I have last made a blog on this site. Well I have
literally got back from CodeGaren07 just now which I blog about in another post
about my experiences.
For those of you who attended CodeGarden07 you may have been aware that I was
due to release a NEW website package to the community and some of you may have
seen glimpses of it during sessions here and there.
When I first started using Umbraco about a year and half ago now, I struggled to
use Umbraco at first as there was no real documentation (but this due to change
- HURRAY for Umbraco Books). So I taught myself anyway possible and one of the
best ways I learnt was downloading and installing the website package and
looking how documents, templates and XSLTs and so on was all used together to
build the website. So this package is aimed more for new people to the umbraco
platform to learn and understand how to build common elements of a website.
The aim for this package is to release it to the community and see what needs to
be improved/fixed/tweaked by feedback I receive from you guys & girls, but where
I would like to see this package going is that people release new CSS for
the website package so that the design and layout can be changed easily. If you
do not know what I mean an excellent exmaple of this is
CSSZenGarden which uses the same HTML structure but a different CSS file to
change the look and feel of the site.