Navigation

 ·   Wiki Home
 ·   Wiki Help
 ·   Categories
 ·   Title List
 ·   Uncategorized Pages
 ·   Random Page
 ·   File Upload
 ·   Uploaded Files
 ·   Recent Changes
 ·   RSS
 ·   Atom
 ·   What Links Here

Active Members:

Search:

 

Create or Find Page:

 

View Last Ten Changes

Category:HowTo
Category:Query Magic


Question: How can I create a query to display the last 10 entries/changes made in my wiki on my home page or other page?
Answer: You can do this using the query module.

{exp:query sql="SELECT FROM_UNIXTIME(`last_updated`,'%m/%d/%y')
 AS `entry_date`, page_name
 FROM `exp_wiki_page` 
 WHERE wiki_id = 1 order by last_updated desc limit 10"
}
   {entry_date} 
- <a href="{path=wiki/{page_name}}">
{exp:replace find="-" replace="SPACE"}{page_name}
{
/exp:replace}</a><br />
</
a><br />
{/exp:query} 

NOTE: Replace with the path to your wiki page, and change the wiki_id as needed.

I’m also using the Find and Replace Plugin to remove the - in the page name.

wikichanges.png