You have no items in your shopping cart.

Tuesday, June 25, 2019 9:41:17 PM

Full size image of the article

Avatar

Posted: one year ago

#8188 Quote

teohhk

Posted: one year ago

#8188 Quote
I would like to display full size image of the article in view ArticleTemplate.Default, how can I get the imageurl?

I managed to display only the thumb width:200

Thanks
Avatar

Posted: one year ago

#8189 Quote

Support

Posted: one year ago

#8189 Quote
You can do it.
Example
Model.PictureModel.FullSizeImageUrl

Old code
        Html.AddHeadCustomParts("<meta property=\"og:image\" content=\"" + Model.PictureModel.ImageUrl + "\" />");

New code
        Html.AddHeadCustomParts("<meta property=\"og:image\" content=\"" + Model.PictureModel.FullSizeImageUrl + "\" />");

ArticleModel has element PictureModel


namespace Nop.Web.Models.Media
{
    public class PictureModel : BaseNopModel
    {
        public PictureModel();

        public string ImageUrl { get; set; }
        public string ThumbImageUrl { get; set; }
        public string FullSizeImageUrl { get; set; }
        public string Title { get; set; }
        public string AlternateText { get; set; }
    }
}

Powered by nopCommerce

Copyright © 2019 FoxNetSoft. All rights reserved