<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000099">
<font face="Georgia">OK, I can see a good use of the Pagelist for
article teasers. As I understand it I use the markup:<br>
<br>
</font>
<pre>(:pagelist fmt=PagelistTemplateSamples#articleteasers group=Main count=1:)
</pre>
<font face="Georgia">However I'm not sure about the code. Is this the
code that the above markup is calling?<br>
<br>
<br>
[[#articleteasers]]<br>
[+{=$Title}+]<br>
%define=leftborder border-left="2px solid #88f" margin-left="2px"
padding="0 0 0 10px"%<br>
>>leftborder<<(:include {=$FullName} lines=5:)<br>
<br>
%right% [-[[{=$FullName}|Read More]]-]<br>
(:if ! equal {>$Group}:)<br>
>><<<br>
<br>
(:if:) <br>
[[#articleteasersend]]<br>
<br>
<br>
Do I place this code in a separate page? If so, what is that page
called? I'm a little confused, especially by the 'fmt' command.<br>
</font><br>
<pre class="moz-signature" cols="72">[] <a class="moz-txt-link-abbreviated" href="http://www.followtheboat.com">www.followtheboat.com</a> []
* tales from the high seas *</pre>
<br>
<br>
The Editor wrote:
<blockquote
cite="midfec7cf150703250431j4718f68bobdb4c50101621756@mail.gmail.com"
type="cite">
<pre wrap="">On 3/25/07, [] Jamie <a class="moz-txt-link-rfc2396E" href="mailto:followtheboat@gmail.com"><followtheboat@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I wondered if there is a recipe for randomising extracts of page content? On
my wiki home page I'd like to insert a box taking up a quarter of the page,
or half a paragraph, which text wrapping round it, and for the recipe to
grab the first three lines or so of a random page. That way whenever a
visitor hits the home page they see a bordered box with constantly changing
content.
If I've not explained that very clearly then please take a look at the
homepage to my website (not the wiki). If you hit refresh you'll see that
the image, the quote in the top right and the 'Random Log Entry' all change
every time the page refreshes. It's a lazy way of making the page look
dynamic I guess.
As an adjunct to this I wondered if there is a way of including only an
extract of a page, rather than the whole page?
Any ideas?
</pre>
</blockquote>
<pre wrap=""><!---->
You can do this I think with a pagelist. If you look at the pagelist
docs, you can set something like order=random, get it to return 1 item
(count), and limit to the first x lines. Note lines are based on hard
returns, not how many soft returns are on the page.
Hope this helps.
Cheers,
Dan
_______________________________________________
pmwiki-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>
<a class="moz-txt-link-freetext" href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a>
</pre>
</blockquote>
</body>
</html>