Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Add CSSstyle to CMS WebPart in Custom Module View modes: 
User avatar
Member
Member
Mercer - 6/17/2010 12:05:08 AM
   
Add CSSstyle to CMS WebPart in Custom Module
I have created a new custom module to allow admins to create a new cms.job document on the site. The module hosts the ContributionList module as shown below.

The list displays in the Administration tab, but without a stylesheet. How can I apply the default stylesheet for this control? (The UserContributions webpart displays richly formated when hosted on the site, but plain on the admin tab.)


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="CMSModules_Church_Volunteers_Default" %>

<%@ Register Src="~/CMSModules/Content/Controls/UserContributions/ContributionList.ascx" TagName="ContributionList" TagPrefix="cms" %>
<%@ Register Src="~/CMSModules/Content/Controls/UserContributions/EditForm.ascx" TagName="ContributionEdit" TagPrefix="cms" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Volunteer list
<cms:ContributionList CssClass="EditContributionEdit" runat="server" allowedchildclasses="CMS.Job" ID="JobListings" newdocumentpath="/Volunteer/%" Path="/Volunteer/%" Visible="true" />


</div>
</form>
</body>
</html>


User avatar
Member
Member
Mercer - 6/17/2010 1:18:04 AM
   
RE:Add CSSstyle to CMS WebPart in Custom Module
Got it. Forgot to add the stylesheet to the page.

<link type="text/css" rel="stylesheet" href="~/CMSPages/GetCSS.aspx?stylesheetname=ECF" />