[pmwiki-users] href="a group's last edited page", or pagelist results in template files

viki.veeks at gmail.com viki.veeks at gmail.com
Tue Jan 18 09:45:45 CST 2011



On 01/16/2011 06:01 PM, DaveG wrote:
>
> On 1/16/2011 7:57 AM, viki.veeks at gmail.com wrote:
>> I hope this makes clearer what I mean with: ``in a template, is it
>> possible to retrieve the address of a group's last edited page?''
> Yes. You include a PmWiki page, which contains a pagelist as Kathyrn
> described. For an example, specifically of finding the last edited page
> in a group, take a look at the Skidoo skin, which displays this type of
> information in tabs on the skin.
>
> The Site.Skidoo-Tabs, which has a section which contains:
> (:pagelist group=-{$SiteGroup},-PmWiki
> trail={$SiteGroup}.AllRecentChanges count=40 list=normal
> fmt=#Skidoo_MRU_Group_List group={$Group}:)
>
>
> Which you could adapt, something like this in a file Site.LatestEditedPage:
> (:pagelist group=-{$SiteGroup},-PmWiki
> trail={$SiteGroup}.AllRecentChanges count=1 list=normal group={$Group}:)
>
> You can then include from the.tmpl file:
> <!--wiki:{$SiteGroup}.LatestEditedPage-->
>
> ~ ~ Dave

Kathyrn, Dave, thanks,
a lot.

mmh... I'm not being clear. My mistake. Again:

I'm looking for something that I can point the href of my anchor tags 
to. I'm starting to daydream that this `something' is a variable defined 
in a PHP file in my skin. Maybe it's a variable, maybe it's something 
else, maybe it's not possible :-)

The relevant anchors of my skin look like:
<a href="{$ScriptUrl}/FindLastEditIn/MyGroup">
<!--wiki:Main.AboutMyGroup-->
</a>
The contents of FindLastEditIn/MyGroup are in my previous mail.

I would like to change this to:
<a href="$Something">
<!--wiki:Main.AboutMyGroup-->
</a>
where `$Something' is such that clicking this link takes the user to 
MyGroup's last edited page.

Dave: maybe I'm missing something in your suggestion, but I don't know 
if it's what I'm looking for. Some clarifications:

Main.AboutMyGroup is a page that is not necessarily related to the 
pagelist/search in question. There are no <a> elements in the 
Main.AboutMyGroup page. The <a></a> opening and closing tags go around, 
and are external to Main.AboutMyGroup. This page is simply a chunk of 
HTML caught inside of an <a> tag, like above:
<a href="$Something"><!--wiki:Main.AboutMyGroup--></a>

Again, thanks!
-i



More information about the pmwiki-users mailing list