Shorten the length of a repeat region

I am trying to figure out how to shorten the length of the
<li> in my repeat region. I want to limit each <li> to
display no more than 40 characters in length on the web page.
In the head of my page:
<script type="text/javascript">
<!--
var dsFeedArticles = new
Spry.Data.XMLDataSet("../feed/feeds/dailyfeed.xml",
"rss/channel/item/article");
-->
</script>
I have the following code in my repeat region:
<ul spry:repeatchildren="dsFeedArticles>
<li class="text">{dsFeedArticles::article}</li>
</ul>
I've looked at possibly a substring function but am confused
to how to implement it. Any ideas? Any assistance would be
appreciated.
Regards,
Michael

Arnout,
Regret the delay. My code is behind an intranet firewall, but
pasted below is the bulk of my code. Any help would be greatly
appreciated.
Regards,
Michael
CODE BELOW:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title></title>
<!--links for css and js-->
<link href="css/main.css" rel="stylesheet" type="text/css"
/>
<link href="css/blockmenu.css" rel="stylesheet"
type="text/css" />
<link href="..css/print.css" rel="stylesheet"
type="text/css" media="print" />
<script src="js/switchcontent.js"
type="text/javascript"></script>
<script src="../SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var dsFeed = new
Spry.Data.XMLDataSet("../feeds/dailyfeed.xml",
"rss/channel/item",{sortOnLoad:"article",sortOrderOnLoad:"descending"});
var dsFeedArticles = new
Spry.Data.XMLDataSet("../feeds/dailyfeed.xml",
"rss/channel/item/article");
dsFeedArticles.addObserver(addTeaserColumn);
function addTeaserColumn(notificationType, notifier, data)
if(notificationType != "onPostLoad")
return;
//Get the unfiltered set of rows from the data set
var rows=notifier.getData(true);
var numRows = rows.length;
// Now loop over every row generate a teaser column
for (var i=0; i < numRows; i++)
//Check the length of the entity decoded version of the desc
column, because we don't want to factor in the length of entity
encoded character names in our length check
var row = rows[ i ];
var desc = row[ "desc" ];
var decodedDesc = Spry.Utils.decodeEntities(desc);
if (decodedDesc.length > 20)
row[ "teaser" ] =
Spry.Utils.encodeEntities(decodedDesc.substring(1,20) + "...");
else
row[ "teaser" ] = desc;
//-->
</script>
</head>
<body>
<!--END LEFT NAVIGATION-->
<!--BEGIN MAIN TEXT SECTION-->
<div id="bodysection">
<div class="summarytitle">
<!-- #BeginDate format:Am1 -->November 10, 2008<!--
#EndDate -->
</div>
<!--date/time is automated, if date is not correct check
your system clock-->
<div id="oneproduct" style="border-bottom:#CCCCCC thin
solid; padding-bottom:5px; ">
<div spry:detailregion="dsFeed dsFeedArticles">
<p><a href="{link}" class="producttitle">
{title} {classification} <span
class="datestamp">{feedDate}</span></a>
<ul spry:repeatchildren="dsFeedArticles">{teaser}
<li class="text" style="list-style-type:none; margin:0px
0 -7px -40px;">{dsFeedArticles::article} </li>
</ul>
</div>
</div>
<!--END MAIN CONTENT-->
</body>
</html>

Similar Messages

  • I am utilizing imovie 7.1 and I am trying to shorten the length of a clip.  How do I do that?

    I am utilizing imovie 7.1 and I am trying to shorten the length of a clip.  How do I do that?

    There are several ways to do this.
    First, drag the clip from your Event to an iMovie Project.
    In the Project, there are several options:
    1) Select the part of the clip you want to keep by dragging with your mouse. When you have it, right click within the selection and select "Trim to Selection". (You can also do this from the Edit Menu.)
    2) Select the part of the clip you want to cut by dragging with your mouse. When you have it, right-click within the selection and choose "Delete Selection". You can also do this from the Edit Menu.
    There is a good Tutorial here. http://www.apple.com/findouthow/movies/imovie08.html#trimming

  • How can I shorten the length of my ringback tone?

    How can I shorten the length of my ringback tone?

    You mean music that the caller hears when they call you? You'll have to contact your carrier. That's a carrier feature, not a function of the phone.

  • Shorten the length of the tabs?

    I'm not sure if I pushed something to change this, I need help changing it back.
    Now
    How it used to be
    I know they're different browsers but they're just there to compare.
    I want to shorten the length of the tab so that it's not taking up the whole bar. It just annoying me for some strange reason.

    I'm not sure if I pushed something to change this, I need help changing it back.
    Now
    How it used to be
    I know they're different browsers but they're just there to compare.
    I want to shorten the length of the tab so that it's not taking up the whole bar. It just annoying me for some strange reason.

  • Limiting the results in a Repeat Region

    Hi,
        I've created a repeat region that lists all the cities from a selected county search.  the problem is the database has multiple city listings. nyone know how to  limit the results to just one city where there are more than one listing???  Must be prety simple

    Thanks for gwtting back to me.  I'm v new to mySQL and databases - I'm doing alright - www.ukbiker.co.uk  but i'm not 100% yet.
    The LIMIT makes sense, and I've seen a couple of answers but i'm not sure how to implement it!!!!
    I've got :
    SELECT suspeNd, city, county
    FROM partners
    WHERE county = colname AND suspend = 'N' and city = LIMIT 1  (I'm betting this isn't right!)
    ORDER BY city ASC
    Don't judge me    LOL

  • How do I shorten the length of the timeline in Adobe Premiere Pro?

    This is my first time using Adobe Premiere Pro.  I created a slideshow of images with music. The entire length with all of the images ends up being around 40 minutes.  The length of the entire timeline is over 10 hours.  I had finished my slideshow and exported it in a .mov format.  The exported file ended up being a 10 hour long video with the first 40 minutes being the actual slideshow and the rest of it was blank.  That file ended up being about 140 GB in size.  All that I want to do is to cut off the rest of the time after the first 40 minutes.  PLEASE HELP!!!!

    Set In and Out Points or the Work Area Bar to the Head and Tail of your edit.
    The when you Export..use either of those as a setting to tell the exporter what  to export.  There is a Menu for it in AME.

  • How do you shorten the length of a song on imovie on the ipod

    im trying to make a video but i put in a song but then i want to shorten it so the song will only play in one part of the video not the whole thing but i dont really know how, can someone help?

    Try the iOS iMovie forum
    https://discussions.apple.com/community/app_store/imovie_for_ios

  • How can I shorten the length of my main URL bar so it doesn't hide Snoopy snoring?

    I have assigned an animated Firefox Persona of Snoopy snoring on top of his doghouse and Woodstock on his tummy, however my URL address bar is hiding most of Snoopy and Woodstock completely. Is there a way to shorten this bar so I can actually see Woodstock?

    The location bar and search bar have a flex property and take all available space.<br />
    You can change the relative size of both with that resizer between the two bars, but that won't change the space that both take.<br />
    You can add Space elements at the right of the bar in the "View > Toolbars > Customize" window to make the location bar shorter.
    You can set a specific width of those bars if you add code to userChrome,css
    Add code to [http://kb.mozillazine.org/UserChrome.css userChrome.css] below the @namespace line.<br />
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */<br />
    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files
    <pre><nowiki>#urlbar-container {max-width: 400px !important;}
    #search-container {max-width: 200px !important;}
    </nowiki></pre>(adjust the width to your needs, no space before px)

  • Video converters (or iTunes?) shortens the length of my movie?

    I downloaded Disney Pixar's movie, "Up," & tried to convert it using "Videora" & "Any Video Converter," but everytime it converts, the video is shortened to 36 minutes.  It is orignally one hour & 36 minutes.  I don't know why it does that because when I play the movie in its original format, it's fine.  Is there any way to fix this?

    If on win or lin, try using handbrake it's best out there. I don't know what to use if you have OSX ...

  • How to change the length of a JTextField?

    Hello,
    I am trying to shorten the length of a JTextField with the following code :
    // up to this point, getColumns() returns a value of 35.
    jTextField1.setColumns(20);
    (jTextField1.getParent()).invalidate();
    (jTextField1.getParent()).validate();
    When I ran this code, it does not change the length of the text field at all.
    I wonder if I am writing my code correctly or is there a better/more correct
    way to do this?
    Thank you for your help.
    Akino.

    Packing a frame works:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ShortText implements ActionListener {
        JTextField txtF;
        JFrame frame;
        public ShortText() {
         frame = new JFrame();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         txtF = new JTextField(30);
         JButton btn = new JButton("Shorten");
         btn.addActionListener(this);
         frame.add(txtF, BorderLayout.NORTH);
         frame.add(btn, BorderLayout.SOUTH);
         frame.pack();
         frame.setVisible(true);
        public static void main(String[] args) {
         new ShortText();
        public void actionPerformed(ActionEvent e) {
         System.out.println("Old Columns: " + txtF.getColumns());
         txtF.setColumns(20);
         frame.pack();
         System.out.println("New Columns: " + txtF.getColumns());
    }

  • Nested templates - problems with inheriting editable/repeating regions

    I have made a template called 'basic', with 2 sections, 'maincontent' and 'sidecontent' then nested a template in it called 'home'. In 'home', I have made repeats of some regions (sidecontent) and edited them to make a section I want on all 'home' type pages. When I make  a new document from 'basic', it has all the same editable and repeating regions as 'basic'. But when I make a new document from 'home' there are no editable or repeating regions, either in 'sidecontent' which I edited or 'maincontent' which I didn't. I want to be able to edit 'maincontent' when I make a new document from 'home', to make repeating regions and edit them. Please can you advise me what to do?
    Thanks

    When I tried to attach the files it automatically zipped them again, so I have put the code above.
    Thanks,
    Rachel

  • How to shorten the Alert text

    Hi Expert ,
    I have to shorten the length of Alert text from 10 lines to 3 lines
    So that it can be accomodate in smll  SMS form and able to send it on
    Production mobile.
    How it can be done on solution manager where all the alerts are centrally configured. ?
    Thanks in advance
    Regards,
    Kamal

    Hi
    Refer http://help.sap.com/saphelp_nw04s/helpdata/en/c4/3a7ea5505211d189550000e829fbbd/content.htm to customize your alerts . Also refer the guide http://help.sap.com/saphelp_nw04s/helpdata/en/28/83493b6b82e908e10000000a11402f/frameset.htm
    Check http://help.sap.com/saphelp_nw04s/helpdata/en/c4/3a7eb2505211d189550000e829fbbd/content.htm (the descriptive text for the node) .
    Regards,
    Nibu Antony
    Edited by: Nibu Antony on Jun 15, 2010 7:52 PM

  • Create Word Doc from list with multiple items (repeat region)

    I have a document library that creates an invoice document based on another list. The list has multiple items that where purchased and need to appear on the invoice. It is only showing the first purchase item and not the others. How do I get all the items
    to display (repeating region)?
    Example:
    Invoice #
    Salesperson
    Items Purchased
    item 1
    item 2
    etc...
    Thanks!

    I've tried these examples but it only grabs the first item and places it in the word document. I need it to grab all the items.
    Example:
    Invoice #
    Salesperson
    Items Purchased
    item 1
    item 2
    etc...

  • Repeating Regions and Editable Tag Attributes?

    I want to produce a template that will let users create pages
    that list items as a thumbnail image and a short text description,
    one after the other.
    I can set this up as a repeating region, but I would also
    like to make only certain attributes of the image editable (src and
    alt for example). However, when I use editable tag attributes to do
    this, the image in each repeated region ends up with the same
    attribute values - when I add a new repeat region and then change
    the src tag through the Template Properties dialog,
    all of the images take on the same src value. Looking at the
    code, it looks like the editable instances in each repeated region
    get the same name, and so I can see that DW will get confused.
    Is this a limitation in DW? Is there a work around anyone can
    suggest?
    TIA

    So, you have some number of people who are editing the child
    pages and you
    want to constrain their editing choices? Are you using
    Contribute?
    Anyhow, I am not aware of any convenient way you can do
    something like this
    using DW's Template features.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "manicbananic" <[email protected]> wrote in
    message
    news:g7pimq$fvg$[email protected]..
    >I want to produce a template that will let users create
    pages that list
    >items
    > as a thumbnail image and a short text description, one
    after the other.
    >
    > I can set this up as a repeating region, but I would
    also like to make
    > only
    > certain attributes of the image editable (src and alt
    for example).
    > However,
    > when I use editable tag attributes to do this, the image
    in each repeated
    > region ends up with the same attribute values - when I
    add a new repeat
    > region
    > and then change the src tag through the Template
    Properties dialog,
    >
    all
    > of the images take on the same src value. Looking at the
    code, it looks
    > like
    > the editable instances in each repeated region get the
    same name, and so I
    > can
    > see that DW will get confused.
    >
    > Is this a limitation in DW? Is there a work around
    anyone can suggest?
    >
    > TIA
    >

  • PHP Email - Repeat Region Equivalent in Body?

    My client wants a summary of products registered in the body
    of an email. My email script works great but I don't know how to
    add the summary of products (what I'm calling a 'repeat region').
    Thanks in advance for your advice and feedback

    jasons wrote:
    > My recordset looks something like:
    >
    > cust_id product_name order_date
    > 100 PRODUCTA 12/23/08
    > 100 PRODUCTB 11/23/07
    > 100 PRODUCTC 09/22/07
    It's not clear whether this is the same recordset as the one
    that
    retrieves the password details, but the principle of doing
    this is
    exactly the same as a repeat region. If you study the code of
    a repeat
    region in a Dreamweaver page you'll see that it looks
    something like this:
    do {
    // code to be repeated
    } while ($row_recordsetName =
    mysql_fetch_assoc($recordsetName));
    So, in the code that builds the body of the email message:
    $message .="Password: $password \n\n";
    $message .="Registered products:\n\n";
    do {
    $message .= $row_recordsetName['product_name']."\n";
    } while ($row_recordsetName =
    mysql_fetch_assoc($recordsetName));
    // rest of mail() script goes here
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

Maybe you are looking for