View Single Post
  #4  
Old 03-29-2011, 06:26 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: combining truncate and replace

You can create a custom Smarty modifier, e.g. like this:

1. create a new Smarty modifier plugin -> "include/templater/plugins/modifier.mymodifier.php" with the following content:
PHP Code:
<?php 

if (!defined('XCART_START')) { header("Location: ../../../"); die("Access denied"); } 

function 
smarty_modifier_mymodifier($param) {
   
$param explode(','$param);
   
$param = isset($param[0]) ? $param[0] : $param;
   return 
$param;


?>

2. add further use something like:

{$_meta_keywords|mymodifier}
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote