Posts – Page 15

Plone: Page Template Redirects

Was wondering how to get a Plone page template to go to a page before the template actually loads. Now, actually getting Plone to not go to this template would be FAR better, but since we can’t actually modify the functionality of the Favourites content items in the content listings (not easily), I instead modify it’s default view.

Using this:

<head>
    <metal:js fill-slot="javascript_head_slot">
        <script type="text/javascript"
        tal:content="python:'location.href=\''+portal.absolute_url()+'/'+here.remoteUrl+'\';;'">
        </script>
    </metal:js>
</head>

We see that the page reloads to the relevant location as soon as the head JavaScript …

Plone: Relative ‘Recent Changes’ Portlets

The problem I’ve been faced with today on our Plone systems is that I need to created a ‘Recent Changes’ portlet that’s relative to where the user is on the site.

Now, the standard portlet doesn’t do anything for me, so that’s pretty useless. I had a look at the standard code for the portlet too and it’s not really feasible to try and mess with:

<tal:recentlist define="view here/@@recent_view; results here/results;">

However, using a (nasty?) workaround, if we put the classic Recent Changes portlet into play, we can change that above …

JCU LyX Layout

Note

Update: this is now available on GitHub at https://github.com/davidjb/JCU-Thesis-LyX-Layout for you to fork and improve. Feel free to drop me a line if you’re using it!

What might be interesting to all you James Cook University or JCU folk out there (yeah, you know who you are!), is the attached zip file to this post. It’s a LyX layout that automagically inserts the required details into your thesis (Honours or PhD), assuming that you give the correct details to LyX. Just so you know, LyX is a WYSIWYM (what-you-see-is-what-you-mean) editor for LaTeX …