Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:46:56+00:00 2026-06-13T16:46:56+00:00

First off, I went into the category/product/list.phtml and copied all the code to c/p/grid.phtml.

  • 0

First off, I went into the category/product/list.phtml and copied all the code to c/p/grid.phtml. I then took out all the code to show something in list view and left the grid view code in place.

I thought I could then write a custom layout per category for the categories that I want to be grid view and set my default settings to list view. This is where I get stuck, I tried the following and get an error.

<catalog_category_default> 
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"> 
<block type="catalog/product_grid" name="product_grid" template="catalog/product/grid.phtml"> 
</block> 
</block> 
</reference> 
</catalog_category_default>

I just get XML data is invalid error.

Help please =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:46:57+00:00Added an answer on June 13, 2026 at 4:46 pm

    I found a different work around.

    I created a new theme and copied the default list.phtml file into it. So the only file I had looked like this:
    app/design/frontend/default/%new template name%/template/catalog/product/list.phtml

    On line 42 I took out the option to check too see if grid was available to just a true setting:

    changed this

    <?php if($this->getMode()!='grid'): ?>
    

    to this

     <?php if(true): ?>
    

    Now under my categories that i want as a list instead of a grid, i can just force magento to use my new theme to force the grid view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off I use this code to make the navigation bar always stay fixed;
First off, my code: @interface Block : NSObject { NSData *data; NSInteger slice_count; }
First off tags wont work. I say this because i create 4 buttons all
First off I apologize if there is another post out there that answers this,
First off, either A) I'm not investigating into this hard enough or B) I've
first off I'm a noob to PHP but here is my problem. I am
First off, I'm coming (back) to Java from C#, so apologies if my terminology
First off, I would like to make clear, that I am SUPER NEW TO
First off, the function in question. bool Animation::loadFrames() { sf::Texture frame[frameCount]; std::string pathToFrame; for(int
First off, kudos to the amazing apache cordova team for making a platform-independent native-like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.