Announcement

Collapse
No announcement yet.

Max Char Length Errors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Max Char Length Errors

    ok ive added the ProductDescription variable into my related items, now im trying to add a max char length so that it only displays a certain ammounth of the description.
    its working so far however im getting errors

    this is the code im useing

    Code:
    <actinic:block php="true" >
    $desc = "<actinic:variable name="ProductDescription" />";
    
    $desc1 = substr($desc, 0,60);
    
    echo "$desc1";
    
    </actinic:block>
    The only problem is this bit

    Code:
    $desc = "<actinic:variable name="ProductDescription" />";
    if I change the variable to just read text it works fine and cuts off at 60 chars but why wont it read the variable?
    www.simonstaton.co.uk

    #2
    Try this:

    Code:
    $desc = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />';

    Comment


      #3
      awesome, it seems to have worked, thanks but now I have reached another problem in my descriptions I use code so I trap the text inside !!<>!! is there a way I can code it in that when !!< is typed it does not appear
      www.simonstaton.co.uk

      Comment


        #4
        Ok I think I have solved my own problem

        In the substr I have just hidden the first 3 charecters

        Code:
        $desc1 = substr($desc, 3,200);
        www.simonstaton.co.uk

        Comment

        Working...
        X