subsection theming... and more... sort of...

8 messages Options
Embed this post
Permalink
David Hostetler () subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink
I have a somewhat open-ended challenge for which I'd like to solicit ideas.

The site I'm currently working on has a requirement that I'm struggling with.  In some ways it needs to be the proverbial 'one big site', but simultaneously also needs some sections to look-n-feel like independent sites (but not truly independent).

We're using one plone instance, but purposing top level folders (and in some cases even 2nd level folders) to exhibit characteristics unique to that portion of the content hierarchy.  In some ways this is trivial and natively supported by plone (localized role assignments, and placeful workflow do the job admirably).  In other ways, this is completely contrary to how plone works.

My question is:  Is this approach making the project unnecessarily difficult?  What ways are there to achieve what I described without having to invasively customize core low-level plone mechanisms?

-------------------------------------------------------------------------------
Further explanation:

We've chosen to go with a single plone instance in order to get two immediate and free benefits:

1. a single shared authentication system (native plone user accounts)
2. automatic and comprehensive search across all content

There's a spiffy new custom theme that's been developed for the instance, but certain aspects of it need to be customized for each subfolder.  But much of the theme is perfectly suitable (and in fact desirable) across the entire instance, and I'm hoping to be able to minimize duplication (both theme code and resources).

Lots of other little things are being identified as needing to be customized 'per site'.  If each site was actually its own plone instance, this would be a straightforward process (though we would have to swallow the duplication pill for a lot of stuff).  But since each site is really just a folder within a single instance, I find myself swimming upstream against the way plone expects to be configured and customized.  So much of plone's behavior is architected with singleton-style mechanisms that operate instance-wide.  That's not a knock against plone -- 99% of the time that's probably the optimally efficient way to do it.

I'm aware of some packages that are relevant:

http://pypi.python.org/pypi/collective.lineage
http://pypi.python.org/pypi/themetweaker.themeswitcher
http://pypi.python.org/pypi/collective.alias

..but I'm a little gun-shy of leaning on things that are on the fringe and might not keep up with plone and thus impose severe migration problems going forward (we want to absorb new plone releases as responsibly and regularly as possible).   I also got burned in plone 2.5 with add-ons that didn't make the jump to plone 3 (at all or in a timely fashion), so I approach product adoption very conservatively.

The alternative to using a single instance and coercing subsections to behave independently, is of course to invert the problem and use multiple plone instances and just 'solve' the two issues that compelled us to use one plone in the first place:  shared user accounts and search.   Both of these strike me as non-trivial and since the features are prerequisites to going live with the site that would seem to make this approach very risky.  Long term we'd love to be on OpenLDAP or something and ditch the native plone user objects, but every time I hear LDAP mentioned it's someone complaining that they can't get it to work right.  And providing cross-site, integrated, transparent, search doesn't strike me as a no-brainer either.

Thanks for reading this far -- I'm basically hoping for suggestions, confirmations, warnings, etc..


cheers,

-hoss

David Hostetler
[hidden email]

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Ed Van Duinen () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink
I have similar requirements and went with a big, single Plone instance with a single custom theme that basically hides most stock viewlets and instead adds lots more portlet slots. The outer "envelope" has some global things like the personal_bar for login, searchbox for site search, etc. but I mostly use portlets to provide visual components which differ depending on context (e.g., put specialized banner image in a tal or static text portlet for branding a microsite or subsection).  I store custom CSS in the portal_skins/custom folder plus add conditions in the portal_css registry to override/add CSS as needed.  Not Plone orthodox but simple to wrap my pea-brain around and fits my needs...  

David Hostetler () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink
hmm... that's intersting: more portlet slots.  Yes - I'd struggled with the fact that most of the viewlets need to be subsite-customized, and so was leaning towards something like themetweaker.themeswitcher and just having multiple full-blown themes.  Exchanging viewlets for portlets sounds more efficient - and at least as capable.



On Wed, Oct 28, 2009 at 12:04, Ed Van Duinen <[hidden email]> wrote:

I have similar requirements and went with a big, single Plone instance with a
single custom theme that basically hides most stock viewlets and instead
adds lots more portlet slots. The outer "envelope" has some global things
like the personal_bar for login, searchbox for site search, etc. but I
mostly use portlets to provide visual components which differ depending on
context (e.g., put specialized banner image in a tal or static text portlet
for branding a microsite or subsection).  I store custom CSS in the
portal_skins/custom folder plus add conditions in the portal_css registry to
override/add CSS as needed.  Not Plone orthodox but simple to wrap my
pea-brain around and fits my needs...


--
View this message in context: http://n2.nabble.com/subsection-theming-and-more-sort-of-tp3906046p3906446.html
Sent from the General Questions mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Ed Van Duinen () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink
BTW, this has been in production for over a year so is sort of legacy in Plone time.  The xdv approach might be the better way to handle this now (http://plone.org/documentation/manual/theming/how-it-works)


hmm... that's intersting: more portlet slots.  Yes - I'd struggled with the
fact that most of the viewlets need to be subsite-customized, and so was
leaning towards something like themetweaker.themeswitcher and just having
multiple full-blown themes.  Exchanging viewlets for portlets sounds more
efficient - and at least as capable.

David Hostetler () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink
Well, unless I misunderstand xdv, that actually is less applicable to the problem than a good old-fashioned Plone product-based theme, and the theming document even says as much.

The issues here aren't so much presentational customizations, but rather actual data customizations - i.e. pieces of the page need to have different content, not just the same content that's differently styled.  So the same core problems are there, with or without xdv.

-hoss


On Wed, Oct 28, 2009 at 12:42, Ed Van Duinen <[hidden email]> wrote:

BTW, this has been in production for over a year so is sort of legacy in
Plone time.  The xdv approach might be the better way to handle this now
(http://plone.org/documentation/manual/theming/how-it-works)


hmm... that's intersting: more portlet slots.  Yes - I'd struggled with the
fact that most of the viewlets need to be subsite-customized, and so was
leaning towards something like themetweaker.themeswitcher and just having
multiple full-blown themes.  Exchanging viewlets for portlets sounds more
efficient - and at least as capable.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Nathan Van Gheem () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink
The issues here aren't so much presentational customizations, but rather actual data customizations - i.e. pieces of the page need to have different content, not just the same content that's differently styled.  So the same core problems are there, with or without xdv.
Well, portlets are context aware and the content is obviously content aware.  The only thing you're missing then is custom viewlets not displaying differently depending on the path?  To do that, you'll need to provide some logic in your viewlets to do different things depending on the path.

If you just want to move around things, style things differently, hide certain things, etc. Deliverance/xdv will do just fine.


-Nathan Van Gheem

2009/10/28 David Hostetler <[hidden email]>
Well, unless I misunderstand xdv, that actually is less applicable to the problem than a good old-fashioned Plone product-based theme, and the theming document even says as much.

The issues here aren't so much presentational customizations, but rather actual data customizations - i.e. pieces of the page need to have different content, not just the same content that's differently styled.  So the same core problems are there, with or without xdv.

-hoss



On Wed, Oct 28, 2009 at 12:42, Ed Van Duinen <[hidden email]> wrote:

BTW, this has been in production for over a year so is sort of legacy in
Plone time.  The xdv approach might be the better way to handle this now
(http://plone.org/documentation/manual/theming/how-it-works)


hmm... that's intersting: more portlet slots.  Yes - I'd struggled with the
fact that most of the viewlets need to be subsite-customized, and so was
leaning towards something like themetweaker.themeswitcher and just having
multiple full-blown themes.  Exchanging viewlets for portlets sounds more
efficient - and at least as capable.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
David Hostetler () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink


On Wed, Oct 28, 2009 at 15:37, Nathan Van Gheem <[hidden email]> wrote:
Well, portlets are context aware and the content is obviously content aware.  The only thing you're missing then is custom viewlets not displaying differently depending on the path?  To do that, you'll need to provide some logic in your viewlets to do different things depending on the path.

If you just want to move around things, style things differently, hide certain things, etc. Deliverance/xdv will do just fine.


Exactly -- I do need more than just the post-plone-page-composition styling that xdv/deliverance do.

And even just context-sensitive logic in viewlets (or portlets) doesn't entirely cover the problem either, unless I treat them as places where I can completely subvert or override core plone mechanisms.

For instance, the site_actions viewlet relies on data from the singleton portal_actions entity.  So if I need the site actions themselves to actually be subsite-sensitive, I need more than just what portal_actions provides - I need the equivalent of multiple portal_actions/site_actions.



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Ed Van Duinen () Re: subsection theming... and more... sort of...
Reply Threaded More More options
Print post
Permalink

Just turn off the site_actions viewlet and put the site specific links in a portlet (and/or put only globals in the site_actions like the accessibility link). For what it's worth, here's my portlet slots theme layout (although the above above/below below + left/middle/right + port/starboard rows are planned only):

personal_bar/path_bar + sitesearch viewlets
Top Slot
LeftColumn Above Above Slot RightColumn
Above Left Slot Above Middle Slot Above Right Slot
Above Port Slot Above Starboard Slot
Above Content Slot
CONTENT
Below Content Slot
Below Port Slot Below Starboard Slot
Below Left Slot Below Middle Slot Below Right Slot
Below Below Slot
Bottom Slot
site_actions + logo viewlets