Nested master pages in the new umbraco? Options
Burla
Posted: Tuesday, July 08, 2008 6:58:06 PM
Rank: Newbie

Joined: 5/2/2008
Posts: 23
Location: Herning, Denmark
Hi everybody,

I read about the umbraco release you announced at codegarden 08 and was thrilled! I crossed my mind, will the new release have nested master pages like ASP.NET 3.5, so it would be possible to have like a 1 collum design and a 2 collum design.

So lets say you in the 2 collum design have 2 contentplace holder and in the page that implement the 2 collum master page you specifi what to show in the 2 place holders. So you dont have to have the same markup for multiple document templates just so they look the same.
drobar
Posted: Tuesday, July 08, 2008 8:03:26 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,410
Location: KY, USA
This is possible even now, if I understand you correctly.

I'd create a master template that had the <html><head>...</head><body>...</body></html> code in it that is common to your entire site. In the <body> there would be a call to <?UMBRACO_TEMPLATE_LOAD_CHILD/>.

Then I'd create a 1column and a 2column template. Each would have only the xhtml unique to their layouts and would specify the Master template to get the surrounding information.

In any template you'd insert GETITEM fields where appropriate for your template. For instance,
Code:

<div id="primary">
    <?UMBRACO_GETITEM field="bodyText"/>
</div>
<div id="sidebar">
    <?UMBRACO_GETITEM field="bodyTextSecondary"/>
</div>


Hope that helps.

cheers,
doug.


MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
Burla
Posted: Tuesday, July 15, 2008 10:22:30 AM
Rank: Newbie

Joined: 5/2/2008
Posts: 23
Location: Herning, Denmark
Sorry. What I ment was i ASP.net in master pages it is possible to declare X amount of ContentPlaceholders. Lets say we have a leftCol placeholder and a rightCol.

Then we have a news page that use the master page. In the leftCol it has the news and in the right it has some text.
Then we have another page, lets say a text page, that has text in both the left and right col.
These pages in asp.net simply have <asp:Content> for both ContentPlacholders and specifi what to show.

In that way you only have to have your mark-up 1 place for the master design, but the two pages content can look completly different. But as in umbraco now that isnt possible because its only possible to load the child design 1 place in the master template. What i would like to have is something like this in the master template:

MASTER TEMPLATE
<div id="leftCol">
LOAD_CHILD_TEMPLATE ("leftCol")
</div>

<div id="rightCol">
LOAD_CHILD_TEMPLATE ("rightCol")
</div>



CHILD TEMPLATE
<?UMBRACO_CONTENT("leftCol")>
Some text, will be loaded in left col
</?UMBRACO_CONTENT("leftCol")>

<?UMBRACO_CONTENT("rightCol")>
Some text 2, will be loaded in right col
</?UMBRACO_CONTENT("rightCol")>
hartvig
Posted: Tuesday, July 15, 2008 12:30:05 PM

Rank: Addict

Joined: 3/17/2008
Posts: 818
Location: Nyborg, Denmark
Yes, that's supported. Templates in Umbraco 4 is Master Pages and supports multiple placeholder controls as well as multiple content controls. The master pages are even stored on file level (in the /masterpages folder) as regular .master files so you can edit them in Visual Studio or Expression Web. Try yourself by downloading a nightly build:
http://umbraco.org/v4

Cheers,
Niels...

Jeeeez, did I really start this :-)
Burla
Posted: Thursday, July 17, 2008 2:49:51 PM
Rank: Newbie

Joined: 5/2/2008
Posts: 23
Location: Herning, Denmark
Sweet!! Great that you take the best of the ASP.NET and enhance the development of websites.

If i have to point out something about umbraco it is the way it handles media/images.
What is the argument to have it as nodes like the content and not just like a file directory?
The problem is when users have to upload multiple images, i havent found a way that is possible in umbraco, where other CMS just have a file uploader component and i normal file structure for the images and other files.

Will that structure be changed for umbraco 4 or?
Dirk
Posted: Thursday, July 17, 2008 3:25:32 PM

Rank: Fanatic

Joined: 9/27/2007
Posts: 459
Location: Belgium
Hi Burla,

Even that can be easily handled. I know of at least 2 projects that can handle upload of media into umbraco backend. First, there's a umbDashboard project (can be found on Codeplex), which has a zip upload utility to put images in media section. Another cool tool is thUtilities (can also be found on Codeplex), written and maintained by Thomas. Lastly, I came across another 'datatype' that does exactly the same as the umbDashboard zip upload, but can't seem to find it anymore.

(All projects need some v4 compatiblity check, I've been playing around with it, though not really successful atm)


Hope that helps.

level 1 certified - umbraco blog at netaddicts.be
rjbullock
Posted: Thursday, July 17, 2008 3:52:23 PM
Rank: Newbie

Joined: 5/22/2008
Posts: 9
Location: Binghamton, NY, US
Will both ASP.NET master pages and the current Umbraco templating system be available in U4?
Dirk
Posted: Thursday, July 17, 2008 4:07:03 PM

Rank: Fanatic

Joined: 9/27/2007
Posts: 459
Location: Belgium
Yep, it is backwards compatible. Just need to set a config value (Hmm, don't exactly know by heart which one?)

Ok, just found it

Code:
<templates>
    <useAspNetMasterPages>true</useAspNetMasterPages>
</templates>


Set value to false if you still want to use v3 templating system

EDIT: Config value to be found in umbracoSettings.config

Regards,
/Dirk


level 1 certified - umbraco blog at netaddicts.be
Users browsing this topic
Guest


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.