Results 1 to 7 of 7

Thread: Rows.html

  1. #1
    Join Date
    Feb 2007
    Posts
    36

    Default Rows.html

    Is there a way to limit the number of characters displayed in the rows.html (including premium and sponsored) in the description field?

    I'd like the category browse and search results to display an excerpt of no more than ### characters.

  2. #2
    Join Date
    Feb 2007
    Posts
    36

    Default

    Just FYI if anyone wants to know...

    I created a custom field called "excerpt" and made it required. The instructions are that this is to be no more than 300 characters. (Dody - it would be nice if we could set a limit on the text fields.) Since I can't set a limit, it's something I'll have to look at before I approve a new listing.

    I then went to the rows.html, premium_rows.html and sponsored_rows.html and replaced

    <%if $description%>
    <p><%$description%></p>

    with

    <%if $excerpt%>
    <p><%$excerpt%></p>

    Problem solved.

  3. #3
    Join Date
    Apr 2006
    Posts
    447

    Default

    did you try:

    <%$description|truncate:300%>

  4. #4
    Join Date
    Sep 2005
    Location
    Poland - Warsaw
    Posts
    342

    Default

    As CEC wrote: truncate is the best way to display a little except.

  5. #5
    Join Date
    Feb 2007
    Posts
    36

    Default

    Quote Originally Posted by CEC View Post
    did you try:

    <%$description|truncate:300%>
    Much better, thanks!

    The percentage is a percentage of what? The total characters in the entry?
    Last edited by JulieW8; 05-15-2011 at 10:37 AM.

  6. #6
    Join Date
    Apr 2006
    Posts
    447

    Default

    This limits the display to 300 characters. It is not a percentage.

  7. #7
    Join Date
    Feb 2007
    Posts
    36

    Default

    Quote Originally Posted by CEC View Post
    This limits the display to 300 characters. It is not a percentage.
    OK, thanks!

Similar Threads

  1. How to use variable <%$tag%> at rows.html
    By chunguens in forum INDEXU DELUXE v2.x
    Replies: 11
    Last Post: 03-17-2010, 09:50 AM
  2. Adding HTML between n rows
    By beto in forum v5.x
    Replies: 3
    Last Post: 01-17-2007, 05:19 AM
  3. Rows.html
    By gspinney in forum v5.x
    Replies: 2
    Last Post: 12-20-2006, 10:18 PM
  4. 2 rows.html templates
    By Rob Picken in forum v5.x
    Replies: 4
    Last Post: 12-28-2003, 08:30 AM
  5. rows.html v/s sp_cat_rows.html ??
    By ideavirus in forum v5.x
    Replies: 1
    Last Post: 06-22-2003, 07:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •