|
|
Rank: Devotee
Joined: 10/14/2007 Posts: 74 Location: Allerød, Denmark
|
Some of the test-users of my site are requesting a functionality to easily see if anything has changed recently. A time/date indicating the most recent update/page publish probably would be enough. The question is - does Umbraco already maintain this info, or do I have to come up with something like that myself. I guess I could put together an Actionhandler to keep track of the most recent update - obviously I do not want to search all my pages for the most recent date everytime I need to show the info.
Any ideas?
>Tommy
|
|
 Rank: Umbracoholic
Joined: 9/27/2007 Posts: 1,123 Location: Belgium
|
Hi, I'd create a user control to be put on the dashboard. A user control that would list all pages that have been updated recently. Each page has a @updateDate property, so you could check against that property to find all pages recently changed. Adding a user control to the dashboard is as easy as modifying the Dashboard.config in the /config forlder. Code:<?xml version="1.0" encoding="utf-8" ?> <dashBoard> <section> <areas> <area>default</area> <area>content</area> </areas>
<tab caption="Recently changed pages"> <control>/path/to/usercontrol.ascx</control> </tab> </section> </dashBoard> Area refers to the section the (So, when clicking on the 'Content' node, you'd get the dashboard for 'Content') Hope that helps. Regards, /Dirk
level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
|
|
Rank: Devotee
Joined: 10/14/2007 Posts: 74 Location: Allerød, Denmark
|
Hi Dirk, and thanks for this nice idea - actually I have never played around with dashboard customizations, so maybe this is a good time to start.
Anyway, as I understand your suggestion, this will be available in the /umbraco administration section only, right?
Initially I considered adding a note on my website frontpage displaying the most recent update time - and really would like to avoid checking @updateDate for all pages everytime the frontpage is viewed, so in this case I just want a global "latest update" time. A "10 most recent updated pages"-list would definitely make sense afterwards.
>Tommy
|
|
 Rank: Umbracoholic
Joined: 9/27/2007 Posts: 1,123 Location: Belgium
|
Ah ok, I understand your point now. It should be quite easy if you just created a small macro, referencing an xslt file that gets the page last updated and writes out its @updateDate property. Or you could create a small user control to do so. Idea here is to use the macro as the macro output can be cached. Look for the 'Cache Period' property on the macro property page. Hope that helps. Regards, /Dirk
level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
|
|
Rank: Devotee
Joined: 10/14/2007 Posts: 74 Location: Allerød, Denmark
|
I didn't think of using caching actively this way - I see your point, and I suppose I'll have to do perform a few tests.
|
|
|
Guest |