Need to Display Category Name in H1 Tag

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I am using nop 2.3. I would like to add an H1 tag to each category page with the each category name in it. I know I need to do it in Category.Template.ProductsInGridOrLines.cshtml, but I don't know what to put in between the h1 tag. Can someone please point me in the right direction? Thank you.
12 years ago
I'm not at my computer to confirm this, but I think you can do:

<h1>@model.name</h1>
12 years ago
That worked thank you! FYI, it's: @Model.Name. The M and N have to be capitalized.
11 years ago
is this fix also applicable to 2.2?
11 years ago
my file doesn't have h1 referenced in it anywhere - couldja post a code example please?
11 years ago
version 2.8


views/catalog/   CategoryTemplate.ProductsInGridOrLines.cshtml

look for this ( line 68)

<div class="page category-page">
    @*uncomment to display title
    <div class="page-title">
        <h1>@Model.Name</h1>
    </div>
    <div class="clear">
    </div>*@


uncomment it

<div class="page category-page">
    @*uncomment to display title *@
    <div class="page-title">
        <h1>@Model.Name</h1>
    </div>
    <div class="clear">
    </div>
11 years ago
shoot - i'm in version 2.2.......... here's the code, any thoughts?

http://mikesoffroad.com/code.txt

maybe you could copy and paste into your editor to get line numbers?

i'm sorry i can't figure this out on my own.... i do appreciate your efforts, if indeed that link is too much work,  i understand.
11 years ago
And make sure you only have one <h1> per page!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.