Static ASPX page

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/28/2009 8:48:48 AM
Gravatar
Total Posts 5

Static ASPX page

I have a static aspx page, i want to incorporate and using your features of cms. Is there any possibilites to do?

4/28/2009 11:42:18 AM
Gravatar
Total Posts 18439

Re: Static ASPX page

Hi,

You can create a virtual page and then link to your physical.aspx page using the fully qualified url in the page settings, ie instead of ~/somepage.aspx you put the full url like http://yoursite/yourcustompage.aspx

However that is not a very elegant integration, the best thing is if you re-factor your .aspx page into a UserControl (ie .ascx), then you can plug it in on any virtual page just like any other feature. See the hello world developer examples for more info.

Hope it helps,

Joe

4/29/2009 3:39:15 AM
Gravatar
Total Posts 5

Re: Static ASPX page

Thanks for your reply, we have incorporated static aspx page through your control but I cant able to edit the content

 

In my module I am not able to view edit link. In built in Modules like blog,event can able to view edit link. How can i do that same thing in my module?

4/29/2009 4:56:37 AM
Gravatar
Total Posts 18439

Re: Static ASPX page

Hi,

I recommend study the code for an existing feature to learn how to link to your own wedit page from the module.

Basically you inherit from SiteModule instead of UserControl, and you add a  <portal:ModuleTitleControl id="Title1" runat="server" /> to your module and in code you set the editlink property on the ModuleTitleControl to your edit page.

Hope it helps,

Joe

4/29/2009 10:55:47 AM
Gravatar
Total Posts 5

Re: Static ASPX page

Static Aspx Page

<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/App_MasterPages/layout.Master" CodeBehind="CustomEdit.aspx.cs" Inherits="mojoPortal.Web.MyCustomModules.CustomEdit" %>
<%@ Register Namespace="mojoPortal.Web.UI" Assembly="mojoPortal.Web" TagPrefix="portal" %>
<%@ Register Namespace="mojoPortal.Web.Controls" Assembly="mojoPortal.Web.Controls"
TagPrefix="mp" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
<portal:ModuleTitleControl id="Title1" runat="server" />

<mp:CornerRounderTop ID="ctop1" runat="server" />
Your Content
<mp:CornerRounderBottom ID="cbottom1" runat="server" />


</asp:content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />

 

 

 

 

 

 


Ascx Page
<%@ Control Language="C#" ClassName="HelloMojoModule.ascx" Inherits="mojoPortal.Web.SiteModuleControl" %>
<%@ Register Namespace="mojoPortal.Web.UI" Assembly="mojoPortal.Web" TagPrefix="portal" %>
<%@ Register Namespace="mojoPortal.Web.Controls" Assembly="mojoPortal.Web.Controls"
TagPrefix="mp" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="mojoPortal.Business" %>
<%@ Import Namespace="mojoPortal.Business.WebHelpers" %>
<%@ Import Namespace="mojoPortal.Web.Framework" %>
<%@ Import Namespace="mojoPortal.Web.Controls" %>
<%@ Import Namespace="mojoPortal.Web.Editor" %>
<%@ Import Namespace="mojoPortal.Net" %>

<script runat="server">


protected override void OnInit(EventArgs e)
{
base.OnInit(e);

}

protected void Page_Load(object sender, EventArgs e)
{

LoadSettings();
PopulateLabels();
if (!Page.IsPostBack)
{
//PopulateControls();
}

}

 

private void PopulateLabels()
{
Title1.EditText = "Edit";
}

private void LoadSettings()
{

// TODO: if your feature has an edit page link to it here
Title1.EditUrl = SiteRoot + "/MyCustomModules/CustomEdit.aspx";
Title1.EditText = "Edit";

Title1.Visible = !this.RenderInWebPartMode;
if (this.ModuleConfiguration != null)
{
this.Title = this.ModuleConfiguration.ModuleTitle;
this.Description = this.ModuleConfiguration.FeatureName;
}

}

</script>

<mp:CornerRounderTop ID="ctop1" runat="server" />
<asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper linksmodule">
<asp:UpdatePanel ID="upGallery" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<portal:ModuleTitleControl ID="Title1" EditText="Edit" EditUrl="~/MyCustomModules/CustomEdit.aspx" runat="server" />
<asp:Panel ID="pnlMyClass" runat="server" CssClass="modulecontent">

</asp:Panel>
<div class="modulefooter">

</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<mp:CornerRounderBottom ID="cbottom1" runat="server" />

 

we followed this steps

step 1:

we added above mentioned user control>Feature Installation/Configuration

step2:

we can able tol see the Module Control content and edit link

step3:

whenever we click edit link we redirect to Static Aspx Page in that  page we cant able to view edit fuctionality(html editor) to

 do changes in our static aspx page content.

 

problem:

we need to edit our static aspx content  by using edit link(htmledit.aspx) pages.

is it possible to incorporate edit functionality in static aspx file .

please joe have look up on our designs tell me whether we need to

incorporate anything to do this  sorry for the disturbance.  

 

 

 

 

 

 

 

 

 

 

You must sign in to post in the forums. This thread is closed to new posts.