How to find correct view to edit

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
I am trying to edit the table in the view that displays the products for a category. The first column named Item contains the image and the description. this makes the display poor because it is not aligned. I want to add another column and split out the image and description.

How do i know what view this table is in? I thought maybe under Views/Catalog/CategoryTemplate.ProductsInGridOrLines but this doesn't seem to be correct.

If i inspect the element in my browser is there an easy way to identify the view used?

Thanks
8 years ago
I believe the below from CategoryTemplate.ProductsInGridOrLines.cshtml is the part that displays the table.

@*product list*@
        @if (Model.Products.Count > 0)
        {
            if (Model.PagingFilteringContext.ViewMode == "list")
            {
            @*list mode*@
            <div class="product-list">
                @foreach (var product in Model.Products)
                {
                    <div class="item-box">
                        @Html.Partial("_ProductBox", product)
                    </div>
                }
            </div>      
            }
            else
            {
            @*grid mode*@
            <div class="product-grid">
                @foreach (var product in Model.Products)
                {
                    <div class="item-box">
                        @Html.Partial("_ProductBox", product)
                    </div>
                }
            </div>
            }
        }

So now in _ProductBox.cshtml

<div class="product-item" data-productid="@Model.Id">
    <div class="picture">
        <a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })" title="@Model.DefaultPictureModel.Title">
            <img alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" />
        </a>
    </div>
    <div class="details">
        <h2 class="product-title">
            <a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })">@Model.Name</a>
        </h2>

im just having trouble understanding where the table header data is written in as a cannot see it in the above...
8 years ago
OK so i should look in the Theme views...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.