Christoph Breidert wrote:
Zoran Balkic schrieb:
Christoph Breidert wrote:
Hi Users/Developers,

does anyone have a template or a paragraphs that lists the latest modified pages on a magnolia system. I could use this on my page, and it would be great if I didn't have to programm it myself.

Suggestions or snippets are very welcome, a nice working solution could be put on the wiki, too.

Cheers,
Christoph


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

For example, if you want meta data with last modification use this>

<![CDATA[<meta name="date" content="]]><fmt:formatDate value="${actpage.metaData.modificationDate.time}" pattern="yyyy-MM-dd'T'HH:mm:ss+01:00"/><![CDATA[" />]]>

or just insert
<fmt:formatDate value="${actpage.metaData.modificationDate.time}" pattern="yyyy-MM-dd'T'HH:mm:ss+01:00"/>
where appropriate and change date pattern accordingly.


of course, don't forget to define the tags, if not already defined in the template jsp...

xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";

cheers
Zoran

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Thx for replying Zoran.

I want a page that displays (say) links to the last 10 modified pages. Do you have a snippet for that?

Cheers, Christoph

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Unfortunately I don't have the snippet or tag...didn't really need it yet...

IMHO, you have to traverse trough whole website tree and sort ten newest pages. There are several algorithms to achive that, just need to get all node type contents and
call .metaData.modificationDate.time and sort them.

You can create tag that could perform this...and maybe send it back to JIRA...;)

p.s. maybe cleaner approach would be the neat search query to get the top ten newest links?

Zoran

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to