You have no items in your shopping cart.

Sunday, November 24, 2024 7:29:43 PM

Full size image of the article

Posted: 6 years ago

#8188 Quote

teohhk

Posted: 6 years 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

Posted: 6 years ago

#8189 Quote

Support

Posted: 6 years 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 © 2023 FoxNetSoft. All rights reserved