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 4172028
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:30:49+00:00 2026-05-21T00:30:49+00:00

I have a CMS page that I am going to display products on with

  • 0

I have a CMS page that I am going to display products on with the following updated XML code:

<reference name="content">
    <block type="catalog/product_list"  name="product_list" template="catalog/product/wholesale-list.phtml">
        <action method="setCategoryId"><category_id>191</category_id></action>
        <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
    </block>
</reference> 

I have tried getting the ID I set in the layout, but no such luck. I have tried:

$_category = Mage::registry(‘current_category’);
$currentCategoryId= $_category->getId();

and

$layer = Mage::getSingleton(‘catalog/layer’);
$_category = $layer->getCurrentCategory();
$currentCategoryId= $_category->getId();

But neither of these methods work. Does anyone know how I can get the ID?

  • 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-05-21T00:30:49+00:00Added an answer on May 21, 2026 at 12:30 am

    Haven’t tried this, but maybe something like:

    $this->getLayout()->getBlock('product_list')->getCategoryId()
    

    This way you are directly getting the variable that you have set on the Block object in the XML.

    Cheers,
    JD

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

Sidebar

Related Questions

I have made a small admin module that mirrors CMS->Page. The block for my
I have the following code: Cms::Page.class_eval do def self.fetch_by_slug(slug) Rails.cache.fetch(cms_page_#{slug}) { Cms::Page.find_by_slug(slug) } end
I have a requirement where the CMS admin will create the content [Article] page
I have made a kind of CMS using CodeIgniter. It loads the page content
I have called the contact form in a cms page and then calling that
I have a page that is part of a CMS control panel where the
I have a page that loads with content. I .clone() certain elements, then hide
I have the following setup: A cms page, the contents of which are showing
I basically want to have a custom CMS page that has pairs of images
I have a CMS website written in aspx 2.0 that allows users to build

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.