|
Home > Archive > Microsoft Content Management Server > October 2004 > CMS Pattern Design : base template
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CMS Pattern Design : base template
|
|
| J. C. Loab 2004-10-18, 2:50 am |
| Hi everyone,
I'm studying CMS development, reading lot of powerpoint files from various
teched (thanks mcmsfaq.com ).
I still have a question : lot of speakers talk about "base template" where
you defined your page layout (title, images ...) and then you create own
templates extending the base template.
I don't really see how to achieve this (I might be stupid :p).
What would be nice is to design a page with layouts like this for example :
--------------------------
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| |
| Stefan [MSFT] 2004-10-18, 7:47 am |
| Hi J,
I assume they mean that you can copy this base template and then update the
copied version.
Master pages which would allow to achieve this by inheritance will be
possible with ASP.NET 2.0 which is not yet supported by MCMS 2002.
Cheers,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------
"J. C. Loab" <psykotick@gmail.com> wrote in message
news:OQP5wkOtEHA.1336@tk2msftngp13.phx.gbl...
> Hi everyone,
>
> I'm studying CMS development, reading lot of powerpoint files from various
> teched (thanks mcmsfaq.com ).
>
> I still have a question : lot of speakers talk about "base template" where
> you defined your page layout (title, images ...) and then you create own
> templates extending the base template.
>
> I don't really see how to achieve this (I might be stupid :p).
> What would be nice is to design a page with layouts like this for example
:
> --------------------------
> | | | |
> | | | |
> | | | |
> | | | |
> | | | |
> | | | |
> | | | |
>
>
| |
|
| Hi
There are well known techhiques to Create your own
masterpage, by inheritance.
Principally, it's a OO design issue.
A simple way is to override the render method of a page.
render the reheader and footer, whereas on a page that
inherits from this page(and will be your actually aspx
file) you write only your specific page controls.
The render method would iterate through all pages and add
them to the page controls collection.
There are more sophisticated paterns, but most of them use
this idea.
If you search "templates .net patterns" in google you will
probablly find the one that satisfy your needs best
| |
| Spencer Harbar [MVP] 2004-10-18, 5:50 pm |
| This is a technique demonstrated by Arpan at TechEd.
It's a common ASP.NET practice which can be applied to MCMS template
development.
step one: Create a "base template" which includes common code elements, for
example code to output meta tags to a literal control.
step two: inherit from the base template class rather than
system.web.ui.page.
there's a sample of this in the video file from the session, but its well
covered in the BPR309 slide deck also.
hth
Spence
www.mcmsfaq.com
"J. C. Loab" <psykotick@gmail.com> wrote in message
news:OQP5wkOtEHA.1336@tk2msftngp13.phx.gbl...
> Hi everyone,
>
> I'm studying CMS development, reading lot of powerpoint files from various
> teched (thanks mcmsfaq.com ).
>
> I still have a question : lot of speakers talk about "base template" where
> you defined your page layout (title, images ...) and then you create own
> templates extending the base template.
>
> I don't really see how to achieve this (I might be stupid :p).
> What would be nice is to design a page with layouts like this for example
> :
> --------------------------
> | | | |
> | | | |
> | | | |
> | | | |
> | | | |
> | | | |
> | | | |
>
>
| |
| Stefan [MSFT] 2004-10-18, 5:50 pm |
| Hi Spencer,
afaik this is only possible for the code parts.
Not for the design time elements.
Cheers,
Stefan.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
MCMS FAQ:
http://download.microsoft.com/downl...6a/MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...t+S
erver
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------
"Spencer Harbar [MVP]" <spence@harbar.net> wrote in message
news:#KRlnXTtEHA.820@TK2MSFTNGP12.phx.gbl...
> This is a technique demonstrated by Arpan at TechEd.
>
> It's a common ASP.NET practice which can be applied to MCMS template
> development.
>
> step one: Create a "base template" which includes common code elements,
for
> example code to output meta tags to a literal control.
> step two: inherit from the base template class rather than
> system.web.ui.page.
>
> there's a sample of this in the video file from the session, but its well
> covered in the BPR309 slide deck also.
>
> hth
> Spence
> www.mcmsfaq.com
>
>
>
>
>
> "J. C. Loab" <psykotick@gmail.com> wrote in message
> news:OQP5wkOtEHA.1336@tk2msftngp13.phx.gbl...
various[vbcol=seagreen]
where[vbcol=seagreen]
example[vbcol=seagreen]
>
>
| |
|
|
| J. C. Loab 2004-10-19, 2:47 am |
| Thanks for all your response ...
I see there's no common answear to this problem =)
Hope that will change with Asp.Net 2.0.
Do we have a road map for the CMS product ? Stefan said that SPS and CMS
will merge but roughly when ? One year ? Two ? We're planning to buy the
product but we would like to have some info about the future (local seller
doesn't have the slightest idea).
Thanks for all and see you soon 
Regards
J.C
| |
| Angus Logan [MVP] 2004-10-19, 2:47 am |
| Hi JC,
Do you have a Microsoft Account Manager/Partner manager/Technical Account
Manager?
If so you should be able to shoot them an email and ask them for some more
info.
Regards
--
________________________________________
Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________
"J. C. Loab" <psykotick@gmail.com> wrote in message
news:eU1ZB1atEHA.1272@TK2MSFTNGP12.phx.gbl...
> Thanks for all your response ...
>
> I see there's no common answear to this problem =)
>
> Hope that will change with Asp.Net 2.0.
>
> Do we have a road map for the CMS product ? Stefan said that SPS and CMS
> will merge but roughly when ? One year ? Two ? We're planning to buy the
> product but we would like to have some info about the future (local seller
> doesn't have the slightest idea).
>
> Thanks for all and see you soon 
>
> Regards
>
> J.C
>
>
| |
| Gabriele Cannata 2004-10-19, 7:48 am |
| If what you want is Master Pages, that is putting page layout in one place ("the master page") then putting all specific content (placeholders, etc) in another page, than there is a couple of techniques to reach this functionality, similar two what master
pages do in asp.net 2.0.
Basically what you do is putting your layout in a user control (e.g. Layout.ascx), then in a page you override AddParsedSubObject, by putting all controls in a collection, then you add Layout.ascx to your page, and the controls you saved in specific place
holders of the user control.
There are several examples of this on the net, do a search for "Master Pages". We are using a slighty more complex version of this with our CMS 2002 web site with good results. Keep in mind that there will be some limitations of what you can put in those
layout controls, for examples code block won't work.
Bye
Gabriele Cannata
[vbcol=seagreen]
> Hi Spencer,
>
> afaik this is only possible for the code parts.
> Not for the design time elements.
> Cheers,
> Stefan.
> MCMS FAQ:
>
> http://download.microsoft.com/downl...3a1-4003-9272-2
> 404e92bb76a/MCMS+2002+-+(complete)+FAQ.htm
>
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
>
> MCMS Sample Code:
>
> http://www.gotdotnet.com/community/...aspx?ProductDro
> pDownList=Content+Management+Server
>
> MCMS Whitepapers and other docs:
>
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
>
> --------------------------------
>
> "Spencer Harbar [MVP]" <spence@harbar.net> wrote in message
> news:#KRlnXTtEHA.820@TK2MSFTNGP12.phx.gbl...
>
> for
>
> various
>
> where
>
> example
>
| |
| Gabriele Cannata 2004-10-19, 7:48 am |
| If what you want is Master Pages, that is putting page layout in one place ("the master page") then putting all specific content (placeholders, etc) in another page, than there is a couple of techniques to reach this functionality, similar two what master
pages do in asp.net 2.0.
Basically what you do is putting your layout in a user control (e.g. Layout.ascx), then in a page you override AddParsedSubObject, by putting all controls in a collection, then you add Layout.ascx to your page, and the controls you saved in specific place
holders of the user control.
There are several examples of this on the net, do a search for "Master Pages". We are using a slighty more complex version of this with our CMS 2002 web site with good results. Keep in mind that there will be some limitations of what you can put in those
layout controls, for examples code block won't work.
Bye
Gabriele Cannata
[vbcol=seagreen]
> Hi Spencer,
>
> afaik this is only possible for the code parts.
> Not for the design time elements.
> Cheers,
> Stefan.
> MCMS FAQ:
>
> http://download.microsoft.com/downl...3a1-4003-9272-2
> 404e92bb76a/MCMS+2002+-+(complete)+FAQ.htm
>
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
>
> MCMS Sample Code:
>
> http://www.gotdotnet.com/community/...aspx?ProductDro
> pDownList=Content+Management+Server
>
> MCMS Whitepapers and other docs:
>
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
>
> --------------------------------
>
> "Spencer Harbar [MVP]" <spence@harbar.net> wrote in message
> news:#KRlnXTtEHA.820@TK2MSFTNGP12.phx.gbl...
>
> for
>
> various
>
> where
>
> example
>
|
|
|
|
|