Template Tags

General Tags

%TITLE% – The title of the item

%URL% – The URL of the item

%DESCRIPTION% – The raw description / summary of the item

%DESCRIPTIONPLAIN% – The description / summary of the item with HTML removed.

%DESCRIPTIONPLAINWITHBR% – The same as %DESCRIPTIONPLAIN% but with line feeds respected.

%DESCRIPTIONUNESCAPED% – For tricky descriptions that come out double-encoded with the other choices.

Note that a comma followed by a number in any tag trims it to that length.. so %DESCRIPTIONPLAIN,100% means a plain description of up to 100 characters in length. %DESCRIPTIONPLAIN,100NODOTS% removes the trailing dots used.

Date Tags

%YEAR% – The year (e.g. 2005)

%YEAR2% – The year in two digit form (e.g. 05)

%MONTH% – The month in numeric form (e.g. 9)

%MONTH2% – The month in two digit form (e.g. 09)

%MONTHLONG% – The item’s month’s full name (e.g. January)

%MONTHSHORT% – The item’s month’s short name (e.g. Jan)

%DAY% – The day of the month in numeric form (e.g. 4)

%DAY2% – The day of the month in two digit numeric form (e.g. 04)

%DAYLONG% – The item’s weekday’s full name (e.g. Monday)

%DAYSHORT% – The item’s weekday’s short name (e.g. Mon)

Time Tags

%TIME12% – The item’s time in 12 hour format (e.g. 2:08 PM)

%TIME24% – The item’s time in 24 hour format (e.g. 14:08)

%HOUR% – The item’s hour (e.g. 2)

%HOUR2% – The item’s hour in two digit form (e.g. 02)

%MINUTE% – The item’s minute (e.g. 8)

%MINUTE2% – The item’s minute in two digit form (e.g. 08)

%SECOND% – The item’s second (e.g. 7)

%SECOND2% – The item’s second in two digit form (e.g. 07)

%TIMEAGO,FULL% – The item’s date in relative terms in full precision.. (e.g. “5 years, 2 days, 12 hours, 7 minutes, and 3 seconds ago”)

%TIMEAGO% – The item’s date in relative terms in middling precision (e.g. “5 years, 2 days ago”)

%TIMEAGO,SHORT% – The item’s date in relative terms of least precision (e.g.”5 years ago” or “2 days ago” or “2 minutes ago”)

Feed Tags

%SOURCENAME% – The item’s feed’s name / title (e.g. “My Blog”)

%SOURCEURL% – The item’s feed’s regular URL (e.g. http://www.someblog.com/)

%SOURCEFEEDURL% – The URL of the item’s source feed itself.

%SOURCEDESCRIPTION% – The item’s feed’s description (e.g. “A blog about nothing.”)

%SOURCEID% – A unique ID number of the source. Ideal for putting into CSS class names for per-feed styling, etc.

Tag Modifiers

%TAG,10% – When you use a tag and follow it with a comma and a number, the tag’s output is truncated to that number of characters. For example, %DESCRIPTIONPLAIN,100% will show the first 100 characters of the description / summary of an item. This can be useful if you want to ensure certain elements in the digest don’t go over a certain length, such as titles and descriptions, both of which can be long.

<lowercase> .. </lowercase> – Anything between these two tags is changed to be all in lower case.

<uppercase> .. </uppercase> – Anything between these two tags is converted to upper case.

<capitalize> .. </capitalize> – Anything between these two tags is capitalized / titleized.. It Means It Would Look Like This Text Here.

<ifdescription> .. </ifdescription> – Anything between these two tags is ONLY included IF the current item has a description. Use this to clean up digests which have combinations of items with no descriptions and longer descriptions.

<gsub from=”text1″ to=”text2″> .. </gsub> – Performs a substitution from ‘text1′ to ‘text2′ within the block.

42 Comments

  1. Posted March 2, 2007 at 7:32 pm | Permalink

    Would there be a way to show what Tags are avaliable when you’ve added a feed URL?

    Just that I’m trying to create an output from a Google Picassa feed and it’s not easy trying to work out the exact tags when they’re under a group tag.

    Regards,

    Lee

  2. Posted March 3, 2007 at 6:19 am | Permalink

    At this time and with this version, no, but that’s something I can certainly keep in mind for an update. However, the tags in this version are reasonably fixed, which limits growth in this area.

  3. Posted March 12, 2007 at 11:07 am | Permalink

    Is it possible to set a rule that opens a new window whenever a user clicks on a link in a newsfeed? (i.e. the ‘_blank’ command)

    Many thanks,
    Rob.

  4. Posted March 12, 2007 at 12:17 pm | Permalink

    If you’re at the level of working with template tags, you don’t need to Rob :) You can just add it yourself.. e.g. %TITLE%

  5. Posted March 12, 2007 at 12:18 pm | Permalink

    Oops.. I mean < a href="%URL%" target="_blank" > %TITLE% < /a >

    You’ll need to remove the spaces and decipher that.

  6. Posted March 14, 2007 at 1:30 pm | Permalink

    Great site and i have signed up. Are you going to implement in the template section a more simple way to modify the templates. i.e boxes where you can choose the colours for the links and wording, size of the feed box in pixels, size of the font and font style etc. Even if you were to add this basic functionality in the template management section it would make it heaps easier for newbies and not so newbies to make some basic changes to the way their feeds look.
    While im on the topic ;-) how do i change the color of the links? ive added the following html code to the header section and it has changed the wording to white which is what i wanted, but the links are still the same color.
    Also what code would i need to be able to change the font size and style?
    Apart from those few suggestions this site is excellent.

  7. Posted March 14, 2007 at 10:22 pm | Permalink

    I have considered making something that is more user friendly in the customization department, but it would probably be slightly separate to Feed Digest (but using the same technology). Feed Digest lets you customize every bit of HTML, so if you know HTML, you can get the exact result you want. This has been at the cost of initial ease-of-use though.

    To change the font size and style, you need something like: surrounding your code. You can do colors the same way too. You could also use CSS. Anything that HTML supports can be used in our templates (or even in the code surrounding your JavaScript include).

  8. Posted March 14, 2007 at 10:23 pm | Permalink

    BTW, if you need specific help, e-mail me, since you can’t paste code on here properly and it won’t come out.

  9. Jesse
    Posted March 17, 2007 at 9:39 pm | Permalink

    How do you adjust the time zone of your feed from GMT to CST?

  10. Jesse
    Posted March 17, 2007 at 9:41 pm | Permalink

    How do you adjust the time zone for feeds from GMT to CST?

  11. Posted March 26, 2007 at 2:39 am | Permalink

    Would there be any way to change the output based on first post item vs. rest of posts? For example, letting the first item in a feed display its complete description while restricting the remaining to a certain amount of characters?

  12. Posted March 26, 2007 at 2:24 pm | Permalink

    There’s no really elegant way of doing that, but you could, in theory, use CSS to do this for now. Something like..

    < div id="item%COUNTER%">< div class="longdescription">%DESCRIPTIONPLAIN%< /div>< div class="shortdescription">%DESCRIPTIONPLAIN,100%< /div>< /div>

    Then use CSS to hide all .longdescription entries, except for #item1 .longdescription.

    It’d work but it’s hacky.

  13. Sérgio N
    Posted April 24, 2007 at 2:34 pm | Permalink

    Is it possible to access each entry’s source title? I need this to filter a multiblog feed.

    Something like: ENTRYSOURCENAME and ENTRYSOURCEURL.

    Thanks!

  14. Posted April 24, 2007 at 3:42 pm | Permalink

    Yes, SOURCENAME and SOURCEURL. They work on a per-entry basis.

  15. J. H. S.
    Posted April 25, 2007 at 10:36 pm | Permalink

    Peter Cooper,

    In a composite feed, is there a way to limit each source feed to a specific number of items. I can do it with Yahoo Pipes and then route that through feeddigest but then the pipes feed does not preserve the %SOURCENAME% info.

  16. Posted April 25, 2007 at 10:39 pm | Permalink

    At the present time, unfortunately not. I am surprised if there is not a way to preserve that info through Yahoo Pipes? Perhaps there’s some way to hook that data through from the sources to the final?

  17. Posted May 18, 2007 at 12:20 am | Permalink

    Hi Peter,

    Great tool – so easy to integrate and I love the complete output control!

    One suggestion, would it be possible to allow users to save their own templates? I’m just starting out with using this, but already I can see that if I had 50 feeds it would be a hassle to update 50 templates if they all needed a common alt.

    Also regarding David Adkin’s request for wysiwyg styling, I’d really appreciate it if this was implemented that the 100% complete control option was preserved for those familiar with html and css :)

    Just out of curiosity how often are the feeds updated? Is it when the feed provider updates at their end?

    Cheers, Dan

  18. Posted May 18, 2007 at 12:43 am | Permalink

    Dan: That was something provisions were made for, but there’s nothing at the interface level to allow that for you yet. If it’s something that might be particularly useful, I can get it higher on the To Do list!

    Re WYSIWYG.. don’t worry, manual control will always be an option.

    Re updates.. it varies a lot. It varies by account level, by how often the source provider lets us check (varies widely) and also by how often your digest is accessed. We do not update digests if they are not accessed, so digest requests trigger updates. This can cause slowness in ‘test’ situations where only one person is using a digest irregularly.. but soon clears up once they’re in the wild.

  19. Thomas
    Posted May 18, 2007 at 5:23 pm | Permalink

    http://www.osteroy.com/
    There is problem with the Norwegian letter “Ã¥”,
    aa = å. Ã¥ shows up insted.. Can this be solved?

  20. Posted May 18, 2007 at 5:29 pm | Permalink

    Without knowing your specific environment, it might be as easy as following this advice to fix:

    http://www.feeddigest.com/forums/topic.php?id=54

  21. unwiredbrain
    Posted June 3, 2007 at 11:15 pm | Permalink

    I think that the WordPress engine made some unneeded work… Take a look at the %MINUTE% definition… ;-)

  22. Posted June 4, 2007 at 2:07 pm | Permalink

    lol, thanks for pointing that out.. software can be a real pain sometimes ;-)

  23. rolando
    Posted June 7, 2007 at 3:49 am | Permalink

    can i put my feed code in to a maquee?
    thanks

  24. Posted June 7, 2007 at 6:14 pm | Permalink

    Rolando, yes.. just try it :) Do a marquee tag, paste your code in, then close the tag. It should work.

  25. rolando
    Posted June 11, 2007 at 6:21 am | Permalink

    The stress mark(acent) and (ñ) letter don´t display in your feed code because when I put it in my webpage it shows me other characters. Is it possible to fix this?
    I am in Mexico

  26. Posted June 11, 2007 at 6:38 am | Permalink

    9 times out of 10, that’s due to your page’s encoding not being stated correctly. A lot of people have this issue, and usually the meta code on our “Get code” page (I think it’s right at the bottom) helps fix it. Basically.. you just need to add a code to your page that tells the browser what character encoding you’re using.

    If you have further questions, post on the forum as it’s monitored more closely.

  27. Posted June 11, 2007 at 6:38 am | Permalink

    Actually.. that goes for anyone else who wants to post here.. please go to the forum and post instead.. it’s better to have the help in one place :)

  28. james shelley
    Posted July 3, 2007 at 7:34 pm | Permalink

    feed digest doesn’t seem to read the tag inside an – am I missing something super simple here?

  29. Posted July 3, 2007 at 8:08 pm | Permalink

    Inside a what? :) I think your HTML might have been stripped by the blog. The forum is usually better for this. Either that or write it out longhand so I can see what you mean :)

  30. Posted July 8, 2007 at 3:44 am | Permalink

    Is it possible to remove the “..” ellipsis when using a limiter like “%TITLE,40%” ?

    I have tried ”
    %TITLE,40% 
    ” and that doesn’t work whatsoever.

  31. Posted July 8, 2007 at 9:13 am | Permalink

    Try %TITLE,40NODOTS%

  32. Posted July 9, 2007 at 2:38 pm | Permalink

    Is there a way to control what time zone the times show up in? I am getting times that are in the future, which I am guessing is because I am in the eastern US, 5 hours behind Greenwich Mean Time. Is there a fix for this?

  33. Posted July 9, 2007 at 3:01 pm | Permalink

    Currently not as such, but.. some people use the %TIMEAGO% tag to get around this.

    That said, there is support for time zones in the code and it all “works” (except everything is currently in a timezone of 0), it’s just not made visible at the control panel end yet, so perhaps that should be my next To Do!

  34. Posted July 9, 2007 at 3:23 pm | Permalink

    I take that back, I’ve just added that feature for you! Edit your digest and there’s a new timezone field. Put -5 in there (or probably -4 due to daylight savings – implementing support for /that/ will be a whole new kettle of fish).

  35. Posted July 15, 2007 at 8:11 am | Permalink

    Are we ever going to be able to get at the workings of the %DESCRIPTION%? I’d like to edit the “tagged by USER under TAG1, TAG2,” part, but can’t see a way to do that.

  36. Posted July 15, 2007 at 9:41 am | Permalink

    What do you mean “the workings” of? It just reflects what your source feeds give out. If you want to do some substitutions, however, you can, using the GSUB tag, as shown above.

  37. Posted July 15, 2007 at 9:42 am | Permalink

    Also, again, please use the forum for support requests, etc, as you can’t write code in these comments properly and I do not always read here.

  38. Phil Lawrence
    Posted November 14, 2007 at 12:48 am | Permalink

    Great tool! Will it work with podcasts?

  39. Posted January 19, 2008 at 5:45 pm | Permalink

    Someone asked about font ,and you put the code in and it only shows the 3 dots, but if someone highlights that with their curser, then right clicks to view selection source, they can see what you wrote. As I changed the background colour to #000 which is black, I need a red font.
    Font colour

  40. simon
    Posted May 29, 2008 at 11:58 am | Permalink

    i have added yahoo news feed but it is not showing images..how can i do this ..please suggest

  41. Posted June 10, 2008 at 8:33 pm | Permalink

    Ok so my feed is working great EXCEPT the title is only showing like 66 characters and truncates the headlines of my feed which is NOT cool.

    So I read the blog and tried this… %TITLE,99NODOTS% and when I tested the feed right after I made the change I get….

    Nothing. Nada. Zip.

    The header and footer html display fine but the feed is AWOL.

    Any suggestions?

    Thanks

  42. vikas
    Posted November 12, 2008 at 1:08 pm | Permalink

    rather than showing website link i would like to show the author name along with the Title.
    is there a way i can do so ?
    any tag to show author name?

    thanks,

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*