Twice in the last couple of days I've seen posts to Seekers of Perl Wisdom where the seeker has mentioned that he or she attempted to use <readmore> tags, and gave up because they appeared to not be working.

While I do not know exactly what was being tried that failed, I will speculate in the hope that I'll hit the nail on the head and help a few who haven't yet gotten used to them.

First a little background. <readmore></readmore> tags can be used if you're making a long post and wish for only part of it to be visible from the index page of its respective posting category. This is considered a common courtesy; long posts make the casual reader who wishes to just glanse over all of the posts in a category do a lot more scrolling than is considered desirable. When a <readmore> tag is introduced into your post's markup, category-page readers will see all of your post up until the tag, after which they'll see a link entitled "readmore". By clicking on the link, the rest of your post will be available.

It should be noted that readmore tags have both a start point (<readmore>), and an end point (</readmore>). You may also specify more than one set of readmore tags if you feel that the flow of your node will still be understandable with multiple portions of it tucked away out of initial view.

What I think is fouling people up is not understanding how the tag works. The readmore tags only hide the enclosed text from view on topic pages and The Monastery Gates page. By topic pages, I mean they only hide text for those people casually browsing Seekers of Perl Wisdom, Meditations, Perl Monks Discussion, and so on. But once a casual reader becomes a more serious reader by following a link directly to the node in question, all of the text will be visible; nothing is hidden. Following a link directly to a node has nearly similar effect to following that node's readmore link, except that following the readmore tag positions the reader at the appropriate place within the node.

What this means to node authors is that when a node author clicks "preview" to see his node, it will look like the readmore tags haven't done their job. Don't worry, they have. In this case, 'preview' doesn't really tell the whole story. Similarly, when a node author follows a link directly to his authored node, again it will look like the readmore tags aren't doing anything. They aren't, in this specific view. But rest assured that by placing the tags, you're doing the casual readers of section index pages a big favor.


Dave

  • Comment on Don't worry about previewing <readmore> tags.

Replies are listed 'Best First'.
Re: Don't worry about previewing <readmore> tags. (CSS hinting would be nice)
by grinder (Bishop) on Mar 05, 2004 at 10:17 UTC
    they appeared to not be working

    What you are saying is that there is no visual cue that anything special is occurring. I think a big improvement would be to wrap the readmore'd section in a <div class="readmore">....</div> section, and then the default themes could tweak the the background colour to effect a subtle change. And you could do your own thing too.

    This would provide immediate visual feedback that the readmore is working correctly. Who knows, this might open the door to allowing readmore sections to be collapsed/expanded on the client side.

    I know it would save me some time when considering a post for the Front Page. If I see something worthy but lengthy, I have to go back to the section contents to see whether a readmore is present. If it's too long I'll put it up for janitoring. Seeing the readmore effect straight away would save a few trips to the server.

Re: Don't worry about previewing <readmore> tags.
by TomDLux (Vicar) on Mar 05, 2004 at 04:14 UTC

    It puts somewhat more load on the server, but how about detecting readmore tags during preview, and displaying a comment below the input box, to the effect of:

    I see you're using <readmore>. You won't detect its effect in this display, but your message will be shorter in the summary lists.

    OK, maybe something less pompous than that.

    Yes, it adds some processing, but is it much more than the current test to see whether you have any text outside the signature tags?

    --
    TTTATCGGTCGTTATATAGATGTTTGCA

Re: Don't worry about previewing <readmore> tags.
by graff (Chancellor) on Mar 05, 2004 at 04:05 UTC
    I think this clarification is very helpful -- in fact I think it would be worth expanding the stock description of "readmore" tags at Writeup Formatting Tips at least a little bit, along the lines you've provided, so newcomers are more likely to get the reasoning for it (and use it properly). Right now, the description is just:
    Anything appearing after a <readmore> tag will not appear in a root node unless you're viewing it by itself. This means you can hide long irrelevant pieces of your post (like a code section) by putting <readmore> tags around it: ... (brief example...)
    I can imagine some people not quite getting the relevant distinctions from that.
Re: Don't worry about previewing <readmore> tags. (PMAHT)
by tye (Sage) on Mar 05, 2004 at 08:44 UTC
Re: Don't worry about previewing <readmore> tags.
by bart (Canon) on Mar 05, 2004 at 08:25 UTC
    It'd be very nice, even for people who know all this, if the site had a way to preview a node in collapsed form — if only just to check that your <readmore> tags work as intended. I imagine this to be a bit like the dual modes, edit/display, in the code section.
Re: Don't worry about previewing <readmore> tags.
by leira (Monk) on Mar 05, 2004 at 08:12 UTC
    Is there a good reason that Preview doesn't just show the <readmore> tags in their collapsed form?

    I haven't had occasion to use <readmore> tags yet, but I would have expected the Preview button to show me my message exactly as it would appear after I created it.

    Isn't that what a preview feature is all about?

    Linda (wondering if she's missing something)

      No, that's a bad thought. The preview must show the contents inside the readmores, so that you can see (preview) whatever is inside them. Also, if you load the node, it will appear with the readmores expanded: it's only when you see it as a reply or in a section when the insides of them are not shown.

      Perhaps for preview mode, the <readmore> tag could render the enclosed text in italics to show that it is having an effect. (I would prefer color, actually, but that might be lost in somemonks custom CSS.)

      Update: Had I read the whole section first, I would have seen that grinder had the same idea, but with a better implementation. >sigh<

      -Theo-
      (so many nodes and so little time ... )