tags:

views:

205

answers:

4

In Umbraco, every page has a content field that you can edit in the admin-area. What I want would be a second content field that I (actually my customer who will be editing the content by himself) can edit on every page. I would then create a masterpage/template that contains the two content areas (the first one as the main content and the second one as the sidebar). At least this is how I would do it. Is this possible or is there even a better approach for having a main content and a separate sidebar on every page?

A: 

Answer found, it is super easy: Add a rich text editor property to the runway text page and have your markup like this:

<table style="font-size: 13px; line-height: 1.5em;">
    <tr>
        <td class="innerTD">
            <div style="min-height:600px; width: 465px;">
<div id="contentHeader">    
    <h2><umbraco:Item runat="server" field="pageName"/></h2>
</div>

                <form id="RunwayMasterForm" runat="server">
                    <umbraco:Item runat="server" field="bodyText" />
                </form>
            </div>
        </td>
        <td style="width: 250px; padding: 8px;">
            <umbraco:Item runat="server" field="sidebarText" />
        </td>
    </tr>
</table>

notice <umbraco:Item runat="server" field="sidebarText" />

usr
A: 

How about the approach described in this blog post: Sidebar Widgets with Umbraco v4 ?

Hendy
A: 

Generally, yes.

Add a new tab to the Document Type that you want to add a sidebar to (called Sidebar or something). Then add a new property or set of properties to that tab to manage the content.

Then in your templates simply add the sidebar to the markup (and edit the CSS to style the new markup) and add your new fields to the template.

In the case above it's this line:

You can also have a default sidebar setting on the home page or any parent item that contains the sidebar info by recursively getting that value. Thus, if the "sidebarText" field on the current page is empty, it would use its parent. That makes managing the content a little easier on a large site and you can change just what you need on the specific page with differences.

The recursive setting is just a check box in the dialog to add an item to a template.

BeaverProj
A: 

I agree with Hendy. The sidebar widget method works great for my clients.

Daniel Bardi