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

Description, no line breaks
 
Crim
Jr. Member
 
Total Posts:  18
Joined:  2010-05-05
 

Hi,

I’ve chosen another theme for my Magento shop but now all my line breaks are gone, when I switch back to the old one everything is ok again.

Screenshots:

http://img41.imageshack.us/img41/6333/screenshot051um.png
http://img847.imageshack.us/img847/1465/screenshot052.png

Can anyone help me with this?
I’m using v1.4

 
Magento Community Magento Community
Magento Community
Magento Community
 
DelMe
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2008-05-13
 

Just make sure the nl2br is in call:

<?php echo $_helper->productAttribute($_productnl2br($_product->getShortDescription()), 'short_description'?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
htmlguy
Jr. Member
 
Total Posts:  1
Joined:  2011-04-18
 

Or

<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($_description), 'description'?>
for regular description - app/design/frontend/base/default/template/catalog/product/view/description.phtml
 
Magento Community Magento Community
Magento Community
Magento Community
 
Crim
Jr. Member
 
Total Posts:  18
Joined:  2010-05-05
 

This is already in /app/design/frontend/default/hypostore-v2/template/catalog/product/view.phtml
The theme is based on the modern theme.

<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>

I don’t have this file app/design/frontend/base/default/template/catalog/product/view/description.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crim
Jr. Member
 
Total Posts:  18
Joined:  2010-05-05
 

Does anyone know how this can be fixed in the modern theme?

 
Magento Community Magento Community
Magento Community
Magento Community
 
quicksand14
Sr. Member
 
Total Posts:  150
Joined:  2010-09-30
 

Open up your WYSYWIG editor that is below it and look at the code in there. It most likely got stripped?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crim
Jr. Member
 
Total Posts:  18
Joined:  2010-05-05
 
quicksand14 - 20 April 2011 01:06 PM

Open up your WYSYWIG editor that is below it and look at the code in there. It most likely got stripped?

I am not using the WYSYWIG editor, this has always worked.
I’m just typing the content straight into the first description box..

 
Magento Community Magento Community
Magento Community
Magento Community
 
quicksand14
Sr. Member
 
Total Posts:  150
Joined:  2010-09-30
 

Doesn’t work like that for me by default. If I want to get line breaks I have to use the WYSIWYG. Perhaps your new theme changed something in base that it should not have, or your first one did. My solution was just if the above responses did not work.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top