Problem accessing mojoSiteMapNode

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.
12/10/2008 5:14:37 AM
Gravatar
Total Posts 15

Problem accessing mojoSiteMapNode

Hi, I am trying to write a next page, previous page control. I have created one using SiteMapNode but doing it this means I have no way (at least I don't think) of accessing whether the page is displayed in the menu or not, so I am trying to use mojoSiteMapNode but I am having trouble getting started.

Here's my code:

using System;
using System.Globalization;
using System.Web;
using System.Web.UI.WebControls;
using mojoPortal.Business.WebHelpers;

public partial class Controls_NextPrevious : System.Web.UI.UserControl
{
  protected void Page_Load(object sender, EventArgs e)
  {
    try
    {
      if (SiteMap.CurrentNode != null)
      {
        mojoSiteMapNode mojoNode = (mojoSiteMapNode)SiteMap.CurrentNode;
      }
    }
    catch(Exception ex)
    {
        Response.Write(ex.Message);
    }
  }
}

The following Compilation Error is thrown:

"The type or namespace name 'mojoSiteMapNode' could not be found (are you missing a using directive or an assembly reference?)"

What am I missing? I am using version 2279

Many thanks for any help

12/10/2008 5:24:05 AM
Gravatar
Total Posts 18439

Re: Problem accessing mojoSiteMapNode

You need a reference to mojoPortal.Web

using mojoPortal.Web;

If your code is in a separate project, you'll need to have a project reference to the mojoPortal.Web project under the References node.

Hope it helps,

Joe

12/10/2008 5:26:29 AM
Gravatar
Total Posts 15

Re: Problem accessing mojoSiteMapNode

You Star!

Thank you, it works now

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