Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Add CSS Friendly Adapters to Cuyahoga in seconds! Options
Constructor
Posted: Sunday, February 22, 2009 4:59:13 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
I thought people may be interested in this. I have used CSS control adapters for years and I forgot that they were not in Cuyahoga! I became frustrated with the output and was wondering what was making it so frustrating to style and format my HTML.

As a solution to a post here the following may be of use.

BEAUTIFUL! Full control over HTML output!

I have added this to my custom solution and it works perfectly (so far )

1) Download this: http://www.codeplex.com/cssfriendly/SourceControl/ListDownloadableCommits.aspx (the latest one)
2) Build it as 'release' and add the 'CSSFriendly.dll' to the webs '/bin' folder
3) Copy the 'App_Browsers' folder to the 'Cuyahoga.Web' directory within your solution.
4) Rebuild the solution.
5) Check your html output. Brilliant! Clean!

I added the CSSFriendly solution to my customised Cuyahoga solution, put in build events to the correct '/bin'. Now I have full control over the html output over all controls.

The output from the solution is now CSSFriendly and clean and there is fine-grained control over html output.

A short note. You may wish to change the DTDs in the templates to avoid Explorers quirks mode. This threw me for a little while.

Besides that, the CSS adapters make it real easy to apply styles. Alternate rows in the gridviews etc.

I hope this is as helpful to others as I find it happy
Constructor
Posted: Tuesday, February 24, 2009 1:53:29 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
Tested and work perfectly. Can not find any issues (so far wink )

Breaking changes when adding to existing build? Only the removal of inline styles on controls rendered (which I avoid anyway).

Take a look how they clean up the html in these examples.

Details View Control XHTML Output
GridView Control XHTML Output

Classes are added for easy styling. Tables are used less.

If you add the project you can even control what XHTML is generated.

No more inline styles on the controls! Lighter markup hopefully.

I have been trying to work towards a situation where the developer has XHTML output, linked external CSS files and linked external JavaScript files as much as possible. It seems to be all there now.

juanwoang
Posted: Friday, February 27, 2009 9:31:02 AM
Rank: Advanced Member
Groups: Member

Joined: 2/6/2009
Posts: 64
Points: 192
I see and feel very good from example link. But I was never use that, so I dont know should or not try it today.
Constructor
Posted: Saturday, February 28, 2009 3:56:25 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
juanwoang wrote:
I see and feel very good from example link. But I was never use that, so I dont know should or not try it today.


Add the 'CSSFriendly.dll' to the webs '/bin' folder and 'App_Browsers' folder to the 'Cuyahoga.Web' directory within your solution. This will enable the CSS friendly markup rendering of controls.

If you do not like then simply delete the 'CSSFriendly.dll' and 'App_Browsers' folder from your solution. It is now back to normal.

I have done this many times as a test. I can not find any issue. If you are worried then simply backup your solution folder first. It takes less than 30 seconds to enable the CSSFriendly rendering! So you should check it out. I always use them now.
juanwoang
Posted: Saturday, February 28, 2009 8:00:19 AM
Rank: Advanced Member
Groups: Member

Joined: 2/6/2009
Posts: 64
Points: 192
Because of I'm a newbie to C# and CUY, too. You are ardour to help other people, like me! I'll try it tomorrow.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.