views:

342

answers:

8

Scenario: I have a pretty standard master page for all my pages. It includes the usual login forms and other dynamic lists to be extracted on each page. Webdesigners can already modify the central content place holder of each page. But still, the design and layout for the master page is still in my project and any modification to the design must be made in Visual Studio and the project re-compiled and re-deployed.

What is the best way to provide near-full access to designing the master page through a CMS? Some of the problems I can identify is the inclusion of any dynamic lists or specific controls such as a login form.

Thanks.

A: 

Well, with a Web Application Project pages are not compiled until accessed (link is 2005 but it still applies). This means that the actual .aspx (and .ascx etc) page is deployed in its original state. A designer can update the format of the page on the server and the updates will be compiled the next time someone requests that content.

It would be relatively trivial to allow designers to download the current pages and upload replacements through your website's UI. However, it isn't very secure (and probably should never be done). It would be better to allow designers access to the virtual directory over the web so they can connect to it using a tool such as Expression Web. This way the designer can open the current website, edit pages, and push the results directly into production (scary tho that thought may be).


As I'm getting downvoted for having a correct answer, let me point out something.

Website projects compile codebehind and pages on demand. If you need to update code regularly, its an okay solution.

Web application projects can be configured to be updatable. All codebehind and classes are compiled into an assembly, and all aspx, ascx, etc pages are deployed and compiled on demand. This means that a designer can connect to the website, update the layout and static content, and see the changes on the next request.

This is my preferred method of deployment. I have a few web application projects out there in the wild, with updatable aspx files deployed alongside my dll. The idea being that users of the website can alter the UI without having to submit updates to me so I can recompile it for them.

Will
It's a Web Site Project, not Web Application project that compiles on demand
hunter
"This means that the actual .aspx (and .ascx etc) page is deployed in its original state. A designer can update the format of the page on the server and the updates will be compiled the next time someone requests that content" Reading comprehension much?
Will
Nothing wrong with this answer other than small name mix up
TFD
What's the name mixup? I'll fix if I'm missing something.
Will
Actually IIRC both Web Site and Web App Project dynamically compile, just that Web Site compiles page by page?
TFD
WAP compiles pages on request. Website compiles code and pages on first request. I believe both compile everything not compiled on first request.
Will
A: 

Unless you want to host your content within a portal I don't know of a perfect answer to this.

If the bits they design just amount to look and feel for the page then this can be controlled by css and you could allow them to create themes using different css files.

Chris Simpson
A: 

Interesting question,
been dabbling in that area myself a while ago.

How knowledgeable are these web designers when not in the realm of not-inside-Photoshop-or-flash?

If using a DIY-CMS, perhaps you can template the most susceptible objects, e. g. making a generic (as in whatever you feel like, not whatever they feel like ;-)) list and a way of entering design, if applicable.

As long as you have a thorough framework set up, that deals with the attributes available to the designers through the CMS, there shouldn't be any need for recompiling... but of course, I can easily see a developer (read : me) stumbling into the gap of nitty-pitty-perfection....

I'm afraid the easiest, and only manageable, path is to standardize how the designers express their needs&wants to you...it just won't code itself...

Could you provide some examples?

Morten Bergfall
+1  A: 

This is indeed an interesting question, and there is no perfect solution. I worked for an ecommerce shop with this issue, and frankly, I just asked the designers in many cases to provide me there html and css, then I would grab the html pieces and css and add them to my project. Yes this was tedious....

Then we we built a cms where the designers could copy and paste their html into html editors, and we would store those pieces of html in a database. My web app would grab those from the database at run time. This solve some issues, but not all, since it did not give them complete control of the design of the web page.

The bottom line is you need to standard as to how the designer will submit their work to you. If you have that, and you can count on the html and css, then you can star to think of possibly building a CMS around that. In this days of RAD, I have found it easier to just work with the html and css delivered to me and simply copy and paste the pieces into my master page and other pages as needed.

A: 

Would it be possible for you to put placeholders in the Master Page in place of the areas that designers should be allowed to edit? Since Master Pages are only editable in Visual Studio, it may be your only feasible option at this point in time. One problem with this approach is that the content put in the placeholders is unlikely to be valid, since you would probably have tags left open in one placeholder and closed in another.

<html>
<head>
<title></title>
<asp:PlaceHolder ID="headerContent" runat="server"></asp:PlaceHolder>
</head>
<body>

<asp:PlaceHolder ID="beforeContent" runat="server"></asp:PlaceHolder>

<asp:PlaceHolder ID="centralContent" runat="server"></asp:PlaceHolder>

<asp:PlaceHolder ID="afterContent" runat="server"></asp:PlaceHolder>

</body>
</html>

I know it's ugly, but it might give you the control you need (as long as you don't mind the XHTML validator warning you all the time). What you put in the placeholders could be your user controls or literal content or whatever, but you'd have to load it dynamically.

Thoughts?

EDIT: This won't work. The PlaceHolder is going to render <div> tags that would mess things up. Maybe you could extend PlaceHolder and override how it renders its HTML.

Cory Larson
I have implemented a solution which resembles this slightly. I did use ContentPlaceHolder instead of asp:PlaceHolder though.
mbp
+1  A: 

While this is not a CMS answer, you do have the ability to allow designers to open the master pages in Expression Web. I will not say it is the greatest tool in the world, but I have had designers work up the master page designs in Expression with good results.

There is a pain point, however. If the entire project is opened, the designer will see the code behind files as separate items, not like the treeview view seen in Visual Studio.

I imagine you could have the master page checked out for use with Expression through a CMS, but there is no built in way to do this, nor do I know of a third party tool to do this. Hopefully Expression Web 3 will make things easier.

Gregory A Beamer
+1  A: 

If you have a CMS, you may be better to give it full control over page content. If there are things the CMS cannot do, you could look to write extensions or plugin modules for the CMS that your designers can then drop onto the page in the CMS's page editor.

If your CMS doesn't support plugin modules, you may be trying to force both the CMS and master pages to do things they were not intended to do.

If the above doesn't work in your situation, here's another thought: place inline frames on your master page that host pages that are edited in the CMS.

Hope that helps.

saille
A: 

a .master is just a text file. They can edit it however they like. There's certainly nothing they'd do to it that would require you to recompile the code just to view it. That's the big win with Master Pages in the first place: designers and other non-programmers can edit them manually without breaking anything.

Give them access to the file under source control and let them go nuts.

Jason Kester