Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Textile formatting
 
Creative Arc
Jr. Member
 
Total Posts:  9
Joined:  2008-01-22
 

Textile formatting would be extremely helpful. I think it would revolutionize some of the day-to-day processes in eCommerce, specifically with regard to product descriptions, categories, etc.

http://www.textism.com/tools/textile/

 Signature 

Creative Arc
Minneapolis Web Design

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

I’m not sure it should be done in the core. It’s fairly simple to implement for a custom theme, an example of implementation:

1. Put Textile.php file into magento/lib/ folder

2. Add to the beginning of page/html/head.php, add $options to the construct arguments as needed.

<?php Mage::register('textile', new Textile?>

3. Update templates you’d like to have textile functionality, for example - catalog/product/view.phtml:

// replace 
<?php echo nl2br($_product->getDescription()) ?>

// with
<?php echo Mage::registry('textile')->process($_product->getDescription()) ?>

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Puchlerz
Jr. Member
 
Total Posts:  15
Joined:  2008-01-09
Lisle, IL
 

This was something that I was looking to do the minute I started using Magento.

My only question is if there is any other recommended or “more suitable” location to register the Textile class. While it works fine, instantiating a class and storing it in the registry from a view template seems dirty to me.

I looked around for a bit, but couldn’t decide the “best” place for it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hirbod
Jr. Member
 
Total Posts:  2
Joined:  2008-08-28
 

Hello,

this doenst work in Magento 1.1.6

I get this Message:

Fatal errorCall to undefined method Textile::process() in /kunden/166789_60314/webseiten/hofkellershop/app/design/frontend/default/hofkeller/template/catalog/product/view.phtml on line 46

Can anybody help me?

Textile in the lib-folder, its registred in the head… and ive changed the view.phtml exactly how you tell… doenst work....

Please Help :-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Puchlerz
Jr. Member
 
Total Posts:  15
Joined:  2008-01-09
Lisle, IL
 

The problem is that there is no process() method in Textile! Replace “process” with ”TextileThis” and it should work.

<?php echo Mage::registry('textile')->TextileThis($_product->getDescription()) ?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hirbod
Jr. Member
 
Total Posts:  2
Joined:  2008-08-28
 

Thank you so much! It works. Perfect!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53156 users|592 users currently online|107163 forum posts