Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Marcin 5 posts 25 karma points
    Sep 26, 2012 @ 22:47
    Marcin
    0

    Dynamic page title

    Hi Guys,

    I want set dynamically page title from macro. In my macro I fetch some product and depends on them I want to change page title. 

    Can somebody help me how can I do this ?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Sep 26, 2012 @ 23:25
    Jan Skovgaard
    0

    Hi Marcin and welcome to our :)

    Could you post your current macro code in here? That way it will be more easy to help you out when knowing your starting point.

    Looking forward to hearing from you.

    /Jan

  • Marcin 5 posts 25 karma points
    Sep 26, 2012 @ 23:41
    Marcin
    0

    Hi thanks for you fast answer :)

    Generally macro is very simple and I put only part of them to clarify what I want to do.

     

    @using Mylene.Enums
    @using Mylene.UCommerce.Services;
    @using Mylene.UCommerce.Services.Helpers;
    @using UCommerce.Catalog
    @using UCommerce.EntitiesV2
    @using UCommerce.Infrastructure
    @using umbraco.cms.businesslogic.media;
    @using umbraco.cms.businesslogic.member
    @{
       
        var _productModelIdValue = umbraco.library.RequestQueryString("product");
        var _productModelId = Int32.Parse(_productModelIdValue);
        var productModel = Product.Get(_productModelId);

        AND NOW I WANT TO DO SOMETHING LIKE THIS
        Page.Title =  productModel.Name;

    }

Please Sign in or register to post replies

Write your reply to:

Draft