Exemple #1
0
    private void PopulateTitleAndMeta(DynamicPageElement element)
    {
        string title;
        string metaDescription;
        string metakeyword;

        Vevo.Domain.Contents.Content content = DataAccessContext.ContentRepository.GetOne(StoreContext.Culture, ContentID);

        title = content.MetaTitle;

        if (content.MetaDescription != "" && content.IsEnabled)
        {
            metaDescription = content.MetaDescription;
        }
        else
        {
            metaDescription = NamedConfig.SiteDescription;
        }

        if (content.MetaKeyword != "" && content.IsEnabled)
        {
            metakeyword = content.MetaKeyword;
        }
        else
        {
            metakeyword = NamedConfig.SiteKeyword;
        }

        element.SetUpTitleAndMetaTags(title, metaDescription, metakeyword);
    }
Exemple #2
0
    private void PopulateTitle()
    {
        Vevo.Domain.Contents.ContentMenuItem currentItem = DataAccessContext.ContentMenuItemRepository.GetOne(
            StoreContext.Culture, ContentMenuItemID);
        DynamicPageElement element = new DynamicPageElement(this);

        switch (currentItem.Name)
        {
        case "Top":
            uxDefaultTitle.Text = "[$TopDefaultTitle]";
            element.SetUpTitleAndMetaTags("[$TopTitle]", currentItem.Description, NamedConfig.SiteKeyword);
            break;

        case "Left":
            uxDefaultTitle.Text = "[$LeftDefaultTitle]";
            element.SetUpTitleAndMetaTags("[$LeftTitle]", currentItem.Description, NamedConfig.SiteKeyword);
            break;

        case "Right":
            uxDefaultTitle.Text = "[$RightDefaultTitle]";
            element.SetUpTitleAndMetaTags("[$RightTitle]", currentItem.Description, NamedConfig.SiteKeyword);
            break;

        default:
            uxDefaultTitle.Text = currentItem.Name;
            element.SetUpTitleAndMetaTags("[$Title]", currentItem.Description, NamedConfig.SiteKeyword);
            break;
        }
    }
Exemple #3
0
    private void PopulateControls()
    {
        DynamicPageElement element = new DynamicPageElement(this);

        if (CurrentCategoryID == "0")
        {
            if (CurrentCategoryName == "")
            {
                element.SetUpTitleAndMetaTags("[$Title] - " + NamedConfig.SiteName, NamedConfig.SiteDescription);
            }
            else
            {
                Response.Redirect("~/Error404.aspx");
            }
        }
        else
        {
            Category category = DataAccessContext.CategoryRepository.GetOne(
                StoreContext.Culture, CurrentCategoryID);

            if (category.IsCategoryAvailableStore(StoreContext.CurrentStore.StoreID) && (category.IsParentsEnable()))
            {
                PopulateTitleAndMeta(element);
            }
            else
            {
                Response.Redirect("~/Error404.aspx");
            }
        }
    }
Exemple #4
0
 private void PopulateTitleAndMeta(DynamicPageElement element)
 {
     Vevo.Domain.Products.Manufacturer manufacturer = DataAccessContext.ManufacturerRepository.GetOne(
         StoreContext.Culture, CurrentManufacturerID);
     element.SetUpTitleAndMetaTags(
         manufacturer.Name,
         manufacturer.GetMetaDescription(StoreContext.Culture),
         manufacturer.GetMetaKeyword(StoreContext.Culture));
 }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetStorefrontEvents().StoreCultureChanged +=
            new StorefrontEvents.CultureEventHandler(Content_StoreCultureChanged);

        uxContentLayout.ContentName = ContentName;
        uxContentLayout.ContentID   = ContentID;
        DynamicPageElement element = new DynamicPageElement(this);

        PopulateTitleAndMeta(element);
    }
Exemple #6
0
    private void PopulateTitleAndMeta()
    {
        DynamicPageElement element = new DynamicPageElement(this);
        string             storeID = new StoreRetriever().GetCurrentStoreID();
        Product            product = DataAccessContext.ProductRepository.GetOne(StoreContext.Culture, ProductID, storeID);

        element.SetUpTitleAndMetaTags(
            product.GetPageTitle(StoreContext.Culture, StoreContext.CurrentStore),
            product.GetMetaDescription(StoreContext.Culture, storeID),
            product.GetMetaKeyword(StoreContext.Culture, storeID));
    }
Exemple #7
0
    private void PopulateTitleAndMeta()
    {
        DynamicPageElement element = new DynamicPageElement(this);
        Blog blog = DataAccessContext.BlogRepository.GetOne(BlogID);

        element.SetUpTitleAndMetaTags(
            blog.BlogTitle,
            blog.MetaDescription,
            blog.MetaKeyword);

        if (DataAccessContext.Configurations.GetBoolValue("FacebookCommentEnabled"))
        {
            /*
             *  og:title - The title of the entity.
             *  og:type - The type of entity. You must select a type from the list of Open Graph types. http://developers.facebook.com/docs/opengraphprotocol/#types
             *  og:image - The URL to an image that represents the entity. Images must be at least 50 pixels by 50 pixels. Square images work best, but you are allowed to use images up to three times as wide as they are tall.
             *  og:url - The canonical, permanent URL of the page representing the entity. When you use Open Graph tags, the Like button posts a link to the og:url instead of the URL in the Like button code.
             *  og:site_name - A human-readable name for your site, e.g., "IMDb".
             *  fb:admins or fb:app_id - A comma-separated list of either the Facebook IDs of page administrators or a Facebook Platform application ID. At a minimum, include only your own Facebook ID.
             *  facebook debug tool: http://developers.facebook.com/tools/debug
             */

            HtmlMeta titleTag = new HtmlMeta();
            titleTag.Attributes.Add("property", "og:title");
            titleTag.Attributes.Add("content", blog.BlogTitle);

            HtmlMeta typeTag = new HtmlMeta();
            typeTag.Attributes.Add("property", "og:type");
            typeTag.Attributes.Add("content", "blog");

            //HtmlMeta imageTag = new HtmlMeta();
            //imageTag.Attributes.Add( "property", "og:image" );
            //imageTag.Attributes.Add( "content", UrlPath.StorefrontUrl + _product.GetPrimaryProductImage().RegularImage );

            HtmlMeta urlTag = new HtmlMeta();
            urlTag.Attributes.Add("property", "og:url");
            urlTag.Attributes.Add("content", Vevo.Shared.WebUI.UrlPath.GetDisplayedUrl());

            HtmlMeta site_nameTag = new HtmlMeta();
            site_nameTag.Attributes.Add("property", "og:site_name");
            site_nameTag.Attributes.Add("content", DataAccessContext.Configurations.GetValue(StoreContext.Culture.CultureID, "SiteName", StoreContext.CurrentStore));

            HtmlMeta app_id = new HtmlMeta();
            app_id.Attributes.Add("property", "fb:app_id");
            app_id.Attributes.Add("content", DataAccessContext.Configurations.GetValue("FacebookCommentAPIKey"));

            Page.Header.Controls.Add(titleTag);
            Page.Header.Controls.Add(typeTag);
            //Page.Header.Controls.Add( imageTag );
            Page.Header.Controls.Add(urlTag);
            Page.Header.Controls.Add(site_nameTag);
            Page.Header.Controls.Add(app_id);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        RegisterStoreEvents();

        if (!IsPostBack)
        {
            IsPromotionAvailable();
            uxItem.PromotionGroupID = PromotionGroupID;
        }

        DynamicPageElement element = new DynamicPageElement(this);

        element.SetUpTitleAndMetaTags("Promotion - " + PromotionGroupName.Replace('_', ' '), NamedConfig.SiteDescription);
    }
Exemple #9
0
    private void PopulateTitleAndMeta(DynamicPageElement element)
    {
        Category category = DataAccessContext.CategoryRepository.GetOne(
            StoreContext.Culture, CurrentCategoryID);
        string title = SeoVariable.ReplaceCategoryVariable(
            category,
            StoreContext.Culture,
            DataAccessContext.Configurations.GetValue(StoreContext.Culture.CultureID, "DefaultCategoryPageTitle", StoreContext.CurrentStore));

        element.SetUpTitleAndMetaTags(
            category.GetPageTitle(StoreContext.Culture, title),
            category.GetMetaDescription(StoreContext.Culture),
            category.GetMetaKeyword(StoreContext.Culture));
    }
    private void PopulateTitleAndMeta(DynamicPageElement element)
    {
        Department department = DataAccessContext.DepartmentRepository.GetOne(
            StoreContext.Culture, CurrentDepartmentID);

        string title = SeoVariable.ReplaceDepartmentVariable(
            department,
            StoreContext.Culture,
            DataAccessContext.Configurations.GetValue(StoreContext.Culture.CultureID, "DefaultDepartmentPageTitle", StoreContext.CurrentStore));

        element.SetUpTitleAndMetaTags(
            department.GetPageTitle(StoreContext.Culture, title),
            department.GetMetaDescription(StoreContext.Culture),
            department.GetMetaKeyword(StoreContext.Culture));
    }
Exemple #11
0
    private void PopulateControls()
    {
        DynamicPageElement element = new DynamicPageElement(this);

        if (CurrentManufacturerID == "0")
        {
            element.SetUpTitleAndMetaTags("[$Title]", NamedConfig.SiteDescription);
        }
        else
        {
            Vevo.Domain.Products.Manufacturer manufacturer = DataAccessContext.ManufacturerRepository.GetOne(
                StoreContext.Culture, CurrentManufacturerID);

            if (manufacturer.IsEnabled)
            {
                PopulateTitleAndMeta(element);
            }
            else
            {
                Response.Redirect("~/Error404.aspx");
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterStoreEvents();
     element = new DynamicPageElement(this);
     AjaxUtilities.ScrollToTop(uxGoToTopLink);
 }