Posts tagged 'template'

Plone: Correcting Page Template Errors Easily

Here’s how to correct pesky problems in your code/XHTML since the line number and column references are slightly useless in the ZMI.

Paste contents from a page or page template from the ZMI into a program like gedit and then the line and column reference numbers will be correct (once you remove the comment about the error from the top of the page).

Editing in the ZMI is a bit painful, but we persevere.

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 …