开发者

Handling dynamic number of columns

开发者 https://www.devze.com 2022-12-31 22:18 出处:网络
I\'m developing a CMS of sorts, and I want to give my users the possibility of customizing the display. More precisely, I want to开发者_运维技巧 give them the ability to choose to display or hide the

I'm developing a CMS of sorts, and I want to give my users the possibility of customizing the display. More precisely, I want to开发者_运维技巧 give them the ability to choose to display or hide the left column, the right column and/or the top div. The middle column cannot be hidden since this is where the actual content will show, whereas the other columns are for navigation or side menus.

I've been looking for a way to make this as smart and flexible as possible. For now I'm using a MasterPage, but that seems to be too constraining. For instance, with MasterPage you need to add a ContentPlaceHolder control in every of your ASPX pages.

What are the best practices in this area? I guess a simpler way of saying this would be "I want to create a template system over which I have complete control".


I would strongly suggest looking into existing platforms that will give your uses far more flexibility and control then you could code from scratch. Try looking at DotNetNuke which is open source.

If you do roll your own cms type system, Master Pages is a good place to start.

From what you describe a master page with 5 content spots

  • header
  • Left column
  • Content column
  • right column
  • footer

In your master page you can have default content for all but Content column.

Then you can include in your master page a user control or custom control which produces content based on your CMS data.

0

精彩评论

暂无评论...
验证码 换一张
取 消