Adding Image to Footer

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
I can't find src\Presentation\Nop.Web\Views\Shared\Components\Footer\Default.cshtml, I'm using ver.4.2
4 years ago
Ok sorry you are using source version - Can you see these directories


So then edit Views\Shared\Components\Footer\Default.cshtml
4 years ago
think i found it, wwwroot/views/shared/components/footer and codes start:
@model FooterModel
@using Nop.Core
@using Nop.Core.Domain.Tax
@inject IWorkContext workContext;
<div class="footer">
    <div class="footer-upper">
        <div class="footer-block information">
            <div class="title">
                <strong>@T("Footer.Information")</strong>
            </div>
            <ul class="list">
                @if (Model.SitemapEnabled && Model.DisplaySitemapFooterItem)
                {
                    <li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
                }
                @foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn1).ToList())
                {
                    <li><a href="@Url.RouteUrl("Topic", new { SeName = topic.SeName })">@topic.Name</a></li>
                }
                @if (Model.DisplayContactUsFooterItem)
                {
                    <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
                }
            </ul>
        </div>
        <div class="footer-block customer-service">
            <div class="title">
                <strong>@T("Footer.CustomerService")</strong>
            </div>
            <ul class="list">
                @if (Model.DisplayProductSearchFooterItem)
                {
                    <li><a href="@Url.RouteUrl("ProductSearch")">@T("Search")</a> </li>
                }
                @if (Model.NewsEnabled && Model.DisplayNewsFooterItem)
                {
                    <li><a href="@Url.RouteUrl("NewsArchive")">@T("News")</a></li>
4 years ago
I added it like this, but nothing on home page still: <div class="cards">
                    <img src="@Url.Content("/shophere.co.uk/wwwroot/wwwroot/images/uploaded")" alt="" />
                </div>
4 years ago
Andy007 wrote:
I added it like this, but nothing on home page

Have you restarted application? 4.20 require restart each change...

Regards,
Tom
4 years ago
yes, done restart and ctrl F5 on site also
4 years ago
Andy007 wrote:
I added it like this, but nothing on home page still:
<div class="cards">
      <img src="@Url.Content("/shophere.co.uk/wwwroot/wwwroot/images/uploaded")" alt="" />
</div>


The line needs to be more like
<img src="@Url.Content("~/images/uploaded/paypal_visa_mastercard_logo.jpg")" alt="" />

~ = start at root (probably wwwroot)
/images/uploaded/ = the directory where the file is located
paypal_visa_mastercard_logo.jpg = the file name to display
4 years ago
So now i added 2 wwwroot, as that where image is in "uploaded" folder, so added below, still not showing:
<img src="@Url.Content("wwwroot/wwwroot/images/uploaded/paypal_visa_mastercard_logo.jpg")" alt="" />
4 years ago
~ = wwwroot
There is no image at this address
http://shophere.co.uk/images/uploaded/paypal_visa_mastercard_logo.jpg
Show me the link that displays the image
4 years ago
Andy007 wrote:
So now i added 2 wwwroot, as that where image is in "uploaded" folder, so added below, still not showing:
<img src="@Url.Content("wwwroot/wwwroot/images/uploaded/paypal_visa_mastercard_logo.jpg")" alt="" />


If you can make sure that paypal_visa_mastercard_logo.jpg is exists in wwwroot/images/uploaded directory, then make it
<img src="/images/uploaded/paypal_visa_mastercard_logo.jpg" alt="" />
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.