[pmwiki-users] automatically changing the front page content?

Mike Shanley up at upisup.com
Mon Aug 20 10:49:51 CDT 2007



Shi Sherebrin wrote:
> Nicholas Buttle wrote:
>   
>> ...  is there any way to automatically change the
>> content of a page in pmwiki?
>>     
Try this:

1. Make yourself a new group, which for this example we'll call

News

2. Now, in Site.LocalTemplates, add this:

[[#frontpage]]
(:template each:)
(:div style="border:1px solid black;margin:5px;padding:5px;":)
!!!{=$Titlespaced}
(:include {=$FullName}:)
(:divend:)
[[#frontpageend]]

3. Finally, add this to your frontpage:

(:pagelist group=News list=normal order=-ctime count=1 fmt=#frontpage:)

4. Now all you have to do is add new pages to the News group and the 
newest entries will be on the frontpage. Alternatively, you can do 
something with page text variables to create on/off switches for pages 
to be displayed. Or set it to include the first few lines of each News 
item with a (more info...) link...

-Mike



More information about the pmwiki-users mailing list