Ah, thanks, sorry: the boxes I envisage are for the user to lay out his own content. So there will be a large ContentPlaceHolder in the master page into which
these boxes can be dragged, inside Sitefinity. The boxes are simply floated divs so that they will flow inside the ContentPlaceHolder.
I've found this guide
which seems to do most of what I want. (It says something (at the bottom) about not working with user controls, but it seems to be ok.)
Here's my control:
|<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SmallContentBox.ascx.cs" Inherits="MusicSales.Ems.SitefinityModules.SmallContentBox" %> |
|<%@ Register TagPrefix="sf" Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls" %> |
|<div class="SmallContentBox"> |
| <sf:GenericContent runat="server" ID="GenericContent1" /> |
| float: left; |
| height:120px; |
| width: 130px; |
| margin: 0 20px 15px 20px; |
| text-align: left; |
| padding: 0px; |
| color: Lime; |
The control is registered as as Toolbox control.
|<add name="Small Content Box" section="Layout" |
| url="~/SitefinityControls/SmallContentBox.ascx" |
| description="A small generic content box." /> |
This works and looks fine on the live site, however the questions I have now are:
(1) In the Sitefinity editor, the box takes up the whole width of the ContentPlaceHolder (easy to reproduce with the above code).
(2) None of the CSS is applied to the text when inside the RadEditor.
(3) I would like to be able to add a BackgroundImageUrl property to the box to allow the user to select an image within Sitefinity. I can't find any documentation on how the WebEditorAttribute is used.
Many thanks in advance,