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;
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 ?
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
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;
}
is working on a reply...