Magento Forum

   
Text output correctly in HTML but not displayed in browser
 
sjdalton
Jr. Member
 
Total Posts:  6
Joined:  2012-09-08
 

I have followed a tutorial to add an additional field in Category admin for a long description that will be displayed below products on a category page.

To display the text on the category page I have edited template > catalog > category > view.phtml and added:

<p><?php echo $this->getCurrentCategory()->getTextBelowProducts() ?></p>

The field is created correctly in the backend, the only trouble im having is displaying the text.

Currently the above code outputs the HTML correctly on the page but doesn’t display on the front end, it stays hidden?

You can see an example below; search for “My custom description” in the source of this page:
http://www.amazingthailandholidays.com/koh-samui/hotels-resorts

It appears twice but just doesn’t display in the browser?!

Does anyone have any ideas?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mage Magician
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2011-01-12
 

clear your browser cache or press Ctrl + F5 and see you will get the text. After some time text goes off. There might be some problem in CSS or JS code which is hiding these text.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjdalton
Jr. Member
 
Total Posts:  6
Joined:  2012-09-08
 

Tried clearing cache, also tried using different browsers, they all results in the same.

I can’t imagine what it would be in JS or CSS? 

Plain text has also been inserted in random places in view.phtml and this is treated in the same way.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mage Magician
Sr. Member
 
Avatar
Total Posts:  97
Joined:  2011-01-12
 

I am damn sure there is some problem in any js file. Try to change class name “category-description std”, you will see the difference.

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