[Plone-UI] Customize portlets/slots only at front page

Veda Williams veda at onenw.org
Sun Sep 7 23:24:42 UTC 2008

I meant to send this to the ui list as a whole but apparently did not:

You have two options here:

You can create a page template called homepage_view, with code at the top
that overrides the slots:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"

<metal:overrideSlotOne fill-slot="column_one_slot">
  <tal:comment replace="nothing">We don't want the portlets

<metal:overrideSlotTwo fill-slot="column_two_slot">
  <tal:comment replace="nothing">We don't want the portlets

<!-- you could add extra stuff here if you wanted -->

<!-- this stuff below just fills in the main contents of the page with the
standard stuff -->

<metal:main fill-slot="main">
    <tal:main-macro metal:define-macro="main"
           tal:define="text python: here.CookedBody(stx_level=2)">

            Document actions (print, sendto etc)

        <h1 tal:content="object_title" class="documentFirstHeading">
          Title or id
        <div metal:use-macro="here/document_byline/macros/byline">
          Get the byline - contains details about author and modification

        <p class="documentDescription"
        <p tal:condition="python: not text and is_editable"
            This item does not have any body text, click the edit tab to
change it.
        <div class="stx"
             tal:attributes="class python:test(here.Format() in
                                                   'text/x-rst', ), 'stx',
            <div tal:replace="structure text" />

            show related items if they exist

<!-- end center content stuff -->


This is a lot to chew off, but if you have other changes that require
changing your homepage layout, it may be your best option. (Don't forget to
assign homepage_view to portal_types/document as a possible view, then
choose it from the display dropdown menu on your home page).

Your other option is to comment it out with css like this:

.section-front-page #portal-column-one (display:none; }
.section-front-page #portal-column-two (display:none; }
(section-front-page corresponds with the shortname of the homepage, which in
this case would have a shortname of "front-page").


- Veda

On 9/5/08 3:29 PM, "diegorubert" <diegorubert at hotmail.com> wrote:

> Hi!
> I'm using Plone 3 and need hide portlets or left slot of front page. I don't
> want really remove because of sub-folders get portlets from it (or gonna
> must configure portlets on each sub-folder), I want just hide them or left
> slot. I saw right_slots and left_slots property, but it don't works anymore
> on Plone 3, and #portal-column-two { display: none; } works, but only if I
> discover how to use it only on front page...
> Can anyone help-me?
> Thanks!

More information about the UI mailing list