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.
Il y a 12 ans
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.
Il y a 12 ans
I'm not at my computer to confirm this, but I think you can do:

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