February 22nd, 2004

Page Summaries and Customised Entries.

If you've used the Customising the Entries tutorial, and you'd like to use the new Page Summary component, you'll need to update your print_entry function. I just modified the tutorial by adding a small if ... else statement to the top of the funtion that will put the html anchors that are used in the Page Summary component links. You *will* need to do this to get the links to work properly. You don't need to worry about updating the rest of the code. As long as you insert the following 5-line if ... else block at the start of your function then you'll be fine.
  # Print the anchor to be used in the page summary.
  if ($p.view=="friends") {
      """<a name="$e.journal.username$e.itemid"></a>""";
  } else { # for recent and day pages.
      """<a name="item$e.itemid"></a>""";
If you'd like to see where to place it, I recommend you look at the original tutorial.