private void PopulateControls()
    {
        if (ContentID != null)
        {
            Vevo.Domain.Contents.Content content = DataAccessContext.ContentRepository.GetOne(uxLanguageControl.CurrentCulture, ContentID);

            if (!content.IsNull)
            {
                uxContentUrlLink.NavigateUrl = UrlManager.GetContentUrl(ContentID, content.UrlName);
                uxContentUrlLink.Text        = UrlPath.StorefrontUrl + content.UrlName + "-content.aspx";

                uxContentNameText.Text              = content.ContentName;
                uxContentTitleText.Text             = content.Title;
                uxLongDescriptionText.Text          = content.Body;
                uxContentMetaTitleText.Text         = content.MetaTitle;
                uxContentMetaKeywordText.Text       = content.MetaKeyword;
                uxContentMetaDescriptionText.Text   = content.MetaDescription;
                uxContentEnabledCheck.Checked       = content.IsEnabled;
                uxContentShowInSiteMapCheck.Checked = content.IsShowInSiteMap;
                uxSubscriptionLevel.SelectedValue   = content.SubscriptionLevelID;
                uxOther1Text.Text = content.Other1;
                uxOther2Text.Text = content.Other2;
                uxOther3Text.Text = content.Other3;
            }
            else
            {
                ClearInputFields();
            }
        }
    }
Exemple #2
0
    private void Content_StoreCultureChanged(object sender, CultureEventArgs e)
    {
        Vevo.Domain.Contents.Content content = DataAccessContext.ContentRepository.GetOne(
            StoreContext.Culture, ContentID);

        string newURL = UrlManager.GetContentUrl(ContentID, content.UrlName);

        Response.Redirect(newURL);
    }
Exemple #3
0
    private string GetNavigateUrl(String name)
    {
        Content content = DataAccessContext.ContentRepository.GetOne(StoreContext.Culture,
                                                                     DataAccessContext.ContentRepository.GetIDByName(StoreContext.Culture, name));

        if (!content.IsNull)
        {
            return(UrlManager.GetContentUrl(content.ContentID, content.UrlName));
        }
        else
        {
            return(UrlManager.GetContentUrl("0", name));
        }
    }
Exemple #4
0
 protected string GetLink(string id)
 {
     Vevo.Domain.Contents.ContentMenuItem item = DataAccessContext.ContentMenuItemRepository.GetOne(
         StoreContext.Culture, id);
     if (item.ReferringMenuID != "0")
     {
         return(UrlManager.GetContentMenuUrl(item.ContentMenuItemID, item.UrlName));
     }
     else
     {
         Vevo.Domain.Contents.Content contentitem = DataAccessContext.ContentRepository.GetOne(
             StoreContext.Culture, item.ContentID);
         return(UrlManager.GetContentUrl(contentitem.ContentID, contentitem.UrlName));
     }
 }
Exemple #5
0
    protected string GetNavUrl(object item)
    {
        ContentMenuItem currentItem = DataAccessContext.ContentMenuItemRepository.GetOne(
            StoreContext.Culture, ((ContentMenuItem)item).ContentMenuItemID);

        if (!currentItem.LinksToContent())
        {
            return(UrlManager.GetContentMenuUrl(currentItem.ContentMenuItemID, currentItem.UrlName));
        }
        else
        {
            Vevo.Domain.Contents.Content content = DataAccessContext.ContentRepository.GetOne(
                StoreContext.Culture, ((ContentMenuItem)item).ContentID.ToString());
            return(UrlManager.GetContentUrl(content.ContentID, content.UrlName));
        }
    }
Exemple #6
0
    private void GenerateBreadcrumb(DataListItem item)
    {
        Panel  panel               = (Panel)item.FindControl("uxBreadcrumbPanel");
        string name                = DataBinder.Eval(item.DataItem, "Name").ToString();
        string contentMenuItemID   = DataBinder.Eval(item.DataItem, "ContentMenuItemID").ToString();
        string urlName             = DataBinder.Eval(item.DataItem, "UrlName").ToString();
        string parentContentMenuID = DataBinder.Eval(item.DataItem, "ContentMenuID").ToString();

        HyperLink link = new HyperLink();

        if (contentMenuItemID != "0")
        {
            ContentMenuItem currntItem = DataAccessContext.ContentMenuItemRepository.GetOne(
                StoreContext.Culture, contentMenuItemID);
            IList <ContentMenuItem> parentList = new List <ContentMenuItem>();

            if (currntItem.MenuPosition == ContentMenuItem.MenuPositionType.Root)
            {
                parentList.Add(currntItem);
                link      = new HyperLink();
                link.Text = parentList[0].Name;
                //link.Text = "Information";
                link.CssClass = "SiteMapParent";
                panel.Controls.Add(link);

                if (!currntItem.LinksToContent())
                {
                    link.NavigateUrl = UrlManager.GetContentMenuUrl(contentMenuItemID, urlName);
                }
                else
                {
                    Vevo.Domain.Contents.Content content = DataAccessContext.ContentRepository.GetOne(
                        StoreContext.Culture, currntItem.ContentID.ToString());
                    link.NavigateUrl = UrlManager.GetContentUrl(content.ContentID, content.UrlName);
                }
            }
            else
            {
                parentList    = currntItem.GetParentMenuItemList(StoreContext.Culture);
                link          = new HyperLink();
                link.Text     = parentList[0].Name;
                link.CssClass = "SiteMapParent";


                if (!currntItem.LinksToContent())
                {
                    link.NavigateUrl = UrlManager.GetContentMenuUrl(contentMenuItemID, urlName);
                }
                else
                {
                    Vevo.Domain.Contents.Content content = DataAccessContext.ContentRepository.GetOne(
                        StoreContext.Culture, currntItem.ContentID.ToString());
                    link.NavigateUrl = UrlManager.GetContentUrl(content.ContentID, content.UrlName);
                }

                panel.Controls.Add(link);

                for (int i = 1; i < parentList.Count; i++)
                {
                    Label label = new Label();
                    label.Text     = " >> ";
                    label.CssClass = "SiteMapSeparate";
                    panel.Controls.Add(label);

                    link             = new HyperLink();
                    link.Text        = parentList[i].Name;
                    link.CssClass    = "SiteMapParent";
                    link.NavigateUrl = UrlManager.GetContentMenuUrl(
                        parentList[i].ContentMenuItemID, parentList[i].UrlName);

                    panel.Controls.Add(link);
                }
            }
        }
        else
        {
            link          = new HyperLink();
            link.Text     = name;
            link.CssClass = "SiteMapParent";
            panel.Controls.Add(link);
        }
        GenerateContent(item, contentMenuItemID);
    }