Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 3
Moving the product title to the 2columns-left template
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

ok, im having trouble with moving it and adding css elements to it.  I need it at the top of the left column but its under the mini cart.

im trying to make it look like this:
http://dev.newthink.com/owls/3-Product-Listing.jpg

 
Magento Community Magento Community
Magento Community
Magento Community
 
crius
Guru
 
Avatar
Total Posts:  623
Joined:  2007-10-16
Denmark
 

To move it to the top, change

<block type="core/template" name="category.leftinfo" template="catalog/category/left.phtml" />

to

<block type="core/template" name="category.leftinfo" template="catalog/category/left.phtml" before="-" />
 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

im getting an error when i add the before tag

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

Got it on top, now i need to style it. Which is turning out to be more difficult than i thought. Also i needed to make it

block type="core/template" name="category.leftinfo" before="cart_sidebar" template="catalog/category/left.phtml"
 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

Im still having difficulty styling this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
crius
Guru
 
Avatar
Total Posts:  623
Joined:  2007-10-16
Denmark
 

What is the problem? Just put your html in the template and the styles in a css file, e.g. custom.css, and make sure it doesn’t interfere with other styles.

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

im not sure i understand. What html are you referring to?

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

<?php
if (Mage::registry('current_category'))
{
    
echo $this->htmlEscape(Mage::registry('current_category')->getName());
}

In app/design/frontend/default/default/layout/catalog.xml, add this:

<block type="core/template" name="category.leftinfo" template="catalog/category/left.phtml" />

under reference “left” in the following page nodes:

- catalog_category_default
- catalog_category_layered
- catalog_product_view

I have all this done, where do i put the css?

 
Magento Community Magento Community
Magento Community
Magento Community
 
crius
Guru
 
Avatar
Total Posts:  623
Joined:  2007-10-16
Denmark
 

You can put your css in skin/frontend/default/default/css/custom.css.

If you explain to me how you want the category name to be displayed and what the problem is, I can try to give a solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

I want it to be a H1 so that it is like the title of the category. It really doesnt matter what it is, as long as i can change it through css.

this the page currently: http://store.newthink.com/index.php/dresses/
attached is how i want it to look.

Image Attachments
3-Product-Listing.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

i cant give the category name an attribute so it can be control via css.

 
Magento Community Magento Community
Magento Community
Magento Community
 
crius
Guru
 
Avatar
Total Posts:  623
Joined:  2007-10-16
Denmark
 

Use this in your template:

<?php
if (Mage::registry('current_category'))
{
    
echo '<h1>' $this->htmlEscape(Mage::registry('current_category')->getName()) . '</h1>';
}

and put something like this in custom.css:

h1 {
  font
-family"My nice font";
  
font-sizex-large;
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

thank you so much. You have been the most helpful person here. Not even the developers have helped as this much.

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

is there anyway to make it link back to the category it is displaying?

 
Magento Community Magento Community
Magento Community
Magento Community
 
andrewg
Member
 
Avatar
Total Posts:  34
Joined:  2008-07-23
New York
 

so i have it, almost

<?php
if (Mage::registry('current_category'))
{
    
echo '<h2>','<a href=#>' $this->htmlEscape(Mage::registry('current_category')->getName()) .'</a>','</h2>';
}

Im not sure what to replace # with so that it returns the correct category.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3