You have no items in your shopping cart.

Wednesday, May 1, 2024 11:30:02 PM

Full size image of the article

Posted: 5 years ago

#8188 Quote

teohhk

Posted: 5 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: 5 years ago

#8189 Quote

Support

Posted: 5 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