Re-adding plone.global_sections to existing Diazo Theme/Skin

Hi,

I have a site that is a custom version of http://demo.plumi.org/ which has a custom skin (plumi.skin) / Diazo theme.

I would like to re-add the portal.global_sections viewlet in order to use the standard navigation bar or maybe duplicate/override the viewlet and then customize the navigation bar CSS on my needs.

I would really like to keep the Plone feature which automatically generate tabs in the navigation bar and link it to my customized CSS navigation bar.

At the moment if i try a /@@manage-viewlets i can see that the portal.global_sections does not exist,
so i cannot Hide/Show, while if i disable the Diazo theming, and i go to Plone's default interface, then the navigation bar and viewlet are present/visibile again.

I don't know where to start, and i have doubts about the cleanest way to approach this.

To start, am i supposed to clone the existing Diazo skin, then work on the duplicate so to have my customized skin ?

After having my custom skin, where can i modify it to add the needed navigation bar viewlet (portal.global_sections) and then customize its CSS on my needs ?

I tried modified only the CSS of the skin, but of course this is not enough to see again the navigation bar in the skin and hide/show.

Thanks!!

I think you need a Rule to inject the "portal-globalnav" Navigation in your Theme.

<!-- rules.xml -->
<replace css:content-children='#portal-globalnav' css:theme-children='#portal-globalnav' />   
1 Like

Hi 1letter,

Thanks for replying !!

I tried to add the rule you indicated in my rule.xml

http://beta.raw-news.net

I modified:

plumi.app/src/plumi.skin/plumi/skin/theme_resources/rules.xml

adding the line you suggested in two different points of the file (first one, then also the other) but without success.

Do i have to execute buildout again after changing rules.xml or is it enough to restart Plone ?

I already tried restarting but @@manage-viewlets does not show any portal.global_sections viewlet to be Shown.

Is there anything else i have to check/change in other files in order to make the change in rules.xml be effective ?

you can check the actual rules.xml here:

http://pastebin.com/xNLgeLGY

Thanks !

K05

You need a UL Element with the id #portal-globalnav in your Theme iindex.html or whatever.
Check your Site with "?diazo.off=1" this disable the Theme, is the Portal Navigation available? If the Viewlet not available, check the viewlet.xml in your AddOn. Possible is it daeactivated?

Hi 1letter,

where can i find the theme index.html to be modified ?

When i try to browse :

http://beta.raw-news.net/@@manage-viewlets?diazo.off=1

or

http://beta.raw-news.net/?diazo.off=1

It does not work, Diazo is not disabled,
but i think i did the same thing by Site Setup > Diazo theme > Enable theme switch

right ? is it the same thing ?

If you check the http://beta.raw-news.net/ now, you can see that the Viewlet plone.global_sections is visibile because now the Diazo theme is switched off, but if i enable it again, then the visibile Viewlets in @@manage_viewlets are different, and the global_sections disappears.

i searched for viewlet.xml inside the files of my Plone portal:

/plumi.app # find . -name viewlet.xml

but could not find any viewlet.xml file.

The following are the actual AddOns i have:

**Available add-ons**

   HTTP caching support 1.1
Installs plone.app.caching
   Kupu 1.5.0
Kupu is a cross-browser visual editor.
   Marshall 2.1.1
   OpenID Authentication Support 2.0.2
Adds support for authenticating with OpenID credentials in a Plone site
  Add-on Description
   Session refresh support 3.5
Optional plone.session refresh support.
   Workflow Policy Support (CMFPlacefulWorkflow) 1.5.7
Add in Plone the capability to change workflow chains for types in every object. Includes a dependency on core Plone types.
   Working Copy Support (Iterate) 2.1.5
Adds working copy support (aka. in-place staging) to Plone.
   blog.star 1.2
Generic setup for blogging
   collective.js.moment 1.0.1
Extension profile for collective.js.moment.
   collective.piwik.core 0.4
Analytics support for Plone using Piwik
   collective.z3cform.datetimewidget 1.2.0
Enable plone.app.jquerytools support for date-time widget
   fourdigits.portlet.twitter 1.0rc1
Twitter portlet with userinfo, retweets, multi search, filter, language filter functionality, userpictures and number limiter
   unweb.shareit 0.1
Installs the unweb.shareit package

**Activated add-ons**

   ATVocabularyManager 1.6.4
   Captcha widget 1.0.1
z3c.form Captcha widget.
  This add-on has been upgraded. Old profile version was unknown. New profile version is 1.0.1. There is no upgrade procedure defined for this add-on. Please consult the add-on documentation for upgrade information, or contact the add-on author.
   ContentLicensing 2.2.6
Extension Profile for Content Licensing Product.
  Add-on Description
   ContentWellPortlets 4.2.1
Enables the addition of portlets to the central column in a page.
   Diazo theme support 1.0
Installs a control panel to allow on-the-fly theming with Diazo
   LinguaPlone 4.1.3
Multi-lingual support for Plone
  Add-on Description
   MediaElementJS 0.4.1
  Add-on Description
   Plone Captchas 4.2
This product adds captcha support to Plone.
   Plone Classic Theme 1.2.2
The old theme used in Plone 3 and earlier.
   Plone JQuery Integration 1.4.4
Profile for Plone's JQuery resources.
   Plumi 4.5
Video sharing
   Plumi content types 4.5
Automatically installed by the Plumi package. No need to install manually.
  Add-on Description
   Quintagroup Captcha Core 0.4.3
This product adds captcha support to Plone.
   Static resource storage 1.0
A folder for storing and serving static resource files
   Transcode Star 0.21
Transcoding support for Plone
   Twitter portlet API v1.1 fix 1.0
Quick fix for collective.twitterportlet for Twitter API v1.1
   collective.upload 1.0b2
An implementation of the jQuery File Upload Plugin for Plone.
   contentratings 1.1
Extension profile for the contentratings addon.
  Add-on Description
   jQuery UI 1.9.2.0
jQuery UI for Plone
   plone.app.collection 1.0.4
Adds support for new style collections to Plone
   plumi.skin 4.5
Installs the plumi.skin package

viewlets.xml, sorry for my wrong typo

For Theme Debbugging read:

Thanks 1letter !

So far, i've been able to find the following viewlets.xml :

find . -name viewlets.xml

./src/collective.contentlicensing/collective/contentlicensing/profiles/default/viewlets.xml
./src/plumi.app/plumi/app/profiles/default/viewlets.xml
./eggs/Products.CMFPlone-4.2.0.1-py2.7.egg/Products/CMFPlone/profiles/default/viewlets.xml
./eggs/plone.app.upgrade-1.2-py2.7.egg/plone/app/upgrade/v30/profiles/beta3_beta4/viewlets.xml
./eggs/plone.app.upgrade-1.2-py2.7.egg/plone/app/upgrade/v30/profiles/beta2_beta3/viewlets.xml
./eggs/plone.app.upgrade-1.2-py2.7.egg/plone/app/upgrade/v40/profiles/to_beta2/viewlets.xml
./eggs/plone.app.upgrade-1.2-py2.7.egg/plone/app/upgrade/v40/profiles/to_alpha5/viewlets.xml
./eggs/plone.app.upgrade-1.2-py2.7.egg/plone/app/upgrade/v40/profiles/to_beta1/viewlets.xml
./eggs/plone.app.customerize-1.2.2-py2.7.egg/plone/app/customerize/tests/profiles/testing/viewlets.xml
./eggs/plonetheme.classic-1.2.2-py2.7.egg/plonetheme/classic/profiles/default/viewlets.xml
./eggs/Products.ContentWellPortlets-4.2.1-py2.7.egg/Products/ContentWellPortlets/profiles/default/viewlets.xml

cat ./src/collective.contentlicensing/collective/contentlicensing/profiles/default/viewlets.xml

<?xml version="1.0"?>
<object>
  <order manager="plone.htmlhead.links" skinname="*">
    <viewlet name="plone.htmlhead.rdf" />
  </order>
  <order manager="archetypes.edit.afterfieldsets" skinname="*">
    <viewlet name="contentlicensing.editfields" />
    <viewlet name="cmfeditions.versioningfields" />
  </order>
</object>

cat ./src/plumi.app/plumi/app/profiles/default/viewlets.xml

<?xml version="1.0"?>
<object>
  <order manager="plone.portaltop" skinname="Plone Classic Theme" based-on="Plone Default">
    <viewlet name="plone.personal_bar" insert-after="*" />
    <viewlet name="plone.app.i18n.locales.languageselector" insert-after="*" />
    <viewlet name="plone.path_bar" insert-after="*" />
  </order>
  <order manager="plone.portalheader" skinname="Plone Classic Theme" based-on="Plone Default">
    <viewlet name="plone.site_actions" insert-after="plone.skip_links" />
  </order>
  <hidden manager="plone.portalheader" skinname="Plone Classic Theme">
    <viewlet name="plone.personal_bar" />
    <viewlet name="plone.app.i18n.locales.languageselector" />
  </hidden>
  <hidden manager="plone.abovecontent" skinname="Plone Classic Theme">
    <viewlet name="plone.path_bar" />
  </hidden>
  <hidden manager="plone.belowcontent" skinname="Plone Classic Theme">
    <viewlet name="plone.belowcontenttitle.keywords" />
  </hidden>
  <hidden manager="plone.portalfooter" skinname="Plone Classic Theme">
    <viewlet name="plone.site_actions" />
  </hidden> 
</object>

cat ./eggs/Products.CMFPlone-4.2.0.1-py2.7.egg/Products/CMFPlone/profiles/default/viewlets.xml

<?xml version="1.0"?>
<object>
  <order manager="plone.portaltop" skinname="Plone Default">
    <viewlet name="plone.header" />
  </order>
  <order manager="plone.portalheader" skinname="Plone Default">
    <viewlet name="plone.skip_links" />
    <viewlet name="plone.personal_bar" />
    <viewlet name="plone.app.i18n.locales.languageselector" />
    <viewlet name="plone.searchbox" />
    <viewlet name="plone.logo" />
    <viewlet name="plone.global_sections" />
  </order>
  <order manager="plone.abovecontent" skinname="Plone Default">
    <viewlet name="plone.path_bar" />
  </order>
  <order manager="plone.contentviews" skinname="Plone Default">
    <viewlet name="plone.contentviews" />
    <viewlet name="plone.contentactions" />
  </order>
  <order manager="plone.belowcontentbody" skinname="Plone Default">
    <viewlet name="plone.belowcontentbody.relateditems" />
    <viewlet name="plone.abovecontenttitle.documentactions" />
  </order>
  <order manager="plone.belowcontent" skinname="Plone Default">
    <viewlet name="plone.belowcontenttitle.keywords" />
    <viewlet name="plone.nextprevious" />
    <viewlet name="plone.manage_portlets_fallback" />
  </order>
  <order manager="plone.portalfooter" skinname="Plone Default">
    <viewlet name="plone.footer" />
    <viewlet name="plone.colophon" />
    <viewlet name="plone.site_actions" />
  </order>
</object>

cat ./eggs/plone.app.customerize-1.2.2-py2.7.egg/plone/app/customerize/tests/profiles/testing/viewlets.xml

<?xml version="1.0"?>
<object>
  <order manager="plone.portalheader" skinname="Plone Default">
    <viewlet name="standard-test-viewlet" insert-after="plone.logo" />
    <viewlet name="layer-test-viewlet" insert-after="plone.logo" />
  </order>
</object>

cat ./eggs/plonetheme.classic-1.2.2-py2.7.egg/plonetheme/classic/profiles/default/viewlets.xml

<?xml version="1.0"?>
<object>
  <order manager="plone.portaltop" skinname="Plone Classic Theme" based-on="Plone Default">
    <viewlet name="plone.personal_bar" insert-after="*" />
    <viewlet name="plone.app.i18n.locales.languageselector" insert-after="*" />
    <viewlet name="plone.path_bar" insert-after="*" />
  </order>
  <order manager="plone.portalheader" skinname="Plone Classic Theme" based-on="Plone Default">
    <viewlet name="plone.site_actions" insert-after="plone.skip_links" />
  </order>
  <hidden manager="plone.portalheader" skinname="Plone Classic Theme">
    <viewlet name="plone.personal_bar" />
    <viewlet name="plone.app.i18n.locales.languageselector" />
  </hidden>
  <hidden manager="plone.abovecontent" skinname="Plone Classic Theme">
    <viewlet name="plone.path_bar" />
  </hidden>
  <hidden manager="plone.belowcontent" skinname="Plone Classic Theme">
    <viewlet name="plone.belowcontenttitle.keywords" />
  </hidden>
  <hidden manager="plone.portalfooter" skinname="Plone Classic Theme">
    <viewlet name="plone.site_actions" />
  </hidden>
</object>

cat ./eggs/Products.ContentWellPortlets-4.2.1-py2.7.egg/Products/ContentWellPortlets/profiles/default/viewlets.xml

<?xml version="1.0"?>

<object>
     <order manager="plone.portalfooter" skinname="*">
        <viewlet name="contentwellportlets.footerportlets" insert-before="plone.footer"/> 
     </order>
</object>

I intentionally added the following tags inside /src/plumi.app/plumi/app/profiles/default/viewlets.xml to do a test:

  <order manager="plone.portaltop" skinname="Plone Classic Theme" based-on="Plone Default">
    <viewlet name="plone.personal_bar" insert-after="*" />
    <viewlet name="plone.app.i18n.locales.languageselector" insert-after="*" />
    <viewlet name="plone.path_bar" insert-after="*" />
  </order>
  <order manager="plone.portalheader" skinname="Plone Classic Theme" based-on="Plone Default">
    <viewlet name="plone.site_actions" insert-after="plone.skip_links" />
  </order>
  <hidden manager="plone.portalheader" skinname="Plone Classic Theme">
    <viewlet name="plone.personal_bar" />
    <viewlet name="plone.app.i18n.locales.languageselector" />
  </hidden>
  <hidden manager="plone.abovecontent" skinname="Plone Classic Theme">
    <viewlet name="plone.path_bar" />
  </hidden>
  <hidden manager="plone.belowcontent" skinname="Plone Classic Theme">
    <viewlet name="plone.belowcontenttitle.keywords" />
  </hidden>
  <hidden manager="plone.portalfooter" skinname="Plone Classic Theme">
    <viewlet name="plone.site_actions" />
  </hidden> 

because the original file was empty like:

<object>
</object>

I ran the buildout again but still no changes in the @@manage_viewlets, the structure of the skin is always the same.

Regarding the debug/devmode, so far i haven't been able to test it, cause even if run buildout with :

debug-mode = on

inside my buildout.cfg doesn't help, i still see "Production mode" in Site Setup,
plus when i try to build in devel version using develop.cfg it fails as following:

bin/buildout -c develop.cfg
mr.developer: Queued 'collective.blog.portlets' for checkout.
mr.developer: Queued 'collective.contentlicensing' for checkout.
mr.developer: Queued 'collective.transcode.daemon' for checkout.
mr.developer: Queued 'collective.transcode.recipe' for checkout.
mr.developer: Queued 'collective.transcode.star' for checkout.
mr.developer: Queued 'plumi.content' for checkout.
mr.developer: Queued 'plumi.skin' for checkout.
mr.developer: Updated 'collective.blog.portlets' with git.
mr.developer: Updated 'collective.contentlicensing' with git.
mr.developer: Updated 'collective.transcode.star' with git.
mr.developer: Updated 'collective.transcode.recipe' with git.
mr.developer: Updated 'collective.transcode.daemon' with git.
mr.developer: No such branch '4.5rc1'
mr.developer: No such branch '4.5rc1'
Develop: '/home/zope/PLUMI/plumi.app/.'
warning: no files found matching '*' under directory 'plumi'
warning: no files found matching 'TODO'
warning: no previously-included files matching '*pyc' found anywhere in distribution
Develop: '/home/zope/PLUMI/plumi.app/src/plumi.content'
warning: no previously-included files matching '*pyc' found anywhere in distribution
Develop: '/home/zope/PLUMI/plumi.app/src/plumi.skin'
warning: no previously-included files matching '*pyc' found anywhere in distribution
Couldn't develop '/home/zope/PLUMI/plumi.app/src/plumi.locales' (not found)
Develop: '/home/zope/PLUMI/plumi.app/src/collective.transcode.star'
Couldn't develop '/home/zope/PLUMI/plumi.app/src/collective.mediaelementjs' (not found)
Couldn't develop '/home/zope/PLUMI/plumi.app/src/collective.piwik.mediaelement' (not found)
Couldn't develop '/home/zope/PLUMI/plumi.app/src/collective.piwik.core' (not found)
Couldn't develop '/home/zope/PLUMI/plumi.app/src/unweb.recipe.uwsgi' (not found)
Develop: '/home/zope/PLUMI/plumi.app/src/collective.contentlicensing'
Develop: '/home/zope/PLUMI/plumi.app/src/collective.transcode.daemon'
Develop: '/home/zope/PLUMI/plumi.app/src/collective.blog.portlets'
warning: no files found matching '*.mo' under directory 'collective'
Develop: '/home/zope/PLUMI/plumi.app/src/collective.transcode.recipe'
lxml: Static build requested.
While:
  Installing.
  Getting section tags.
  Initializing section tags.
  Loading zc.buildout recipe entry z3c.recipe.tag:default.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/zope/PLUMI/plumi.app/eggs/zc.buildout-2.5.3-py2.7.egg/zc/buildout/buildout.py", line 1995, in main
    getattr(buildout, command)(args)
  File "/home/zope/PLUMI/plumi.app/eggs/zc.buildout-2.5.3-py2.7.egg/zc/buildout/buildout.py", line 550, in install
    [self[part]['recipe'] for part in install_parts]
  File "/home/zope/PLUMI/plumi.app/eggs/zc.buildout-2.5.3-py2.7.egg/zc/buildout/buildout.py", line 1135, in __getitem__
    options._initialize()
  File "/home/zope/PLUMI/plumi.app/eggs/zc.buildout-2.5.3-py2.7.egg/zc/buildout/buildout.py", line 1239, in _initialize
    self.initialize()
  File "/home/zope/PLUMI/plumi.app/eggs/zc.buildout-2.5.3-py2.7.egg/zc/buildout/buildout.py", line 1245, in initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/home/zope/PLUMI/plumi.app/eggs/zc.buildout-2.5.3-py2.7.egg/zc/buildout/buildout.py", line 1204, in _install_and_load
    req.project_name, group, entry)
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2290, in load
    self.require(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2307, in require
    items = working_set.resolve(reqs, env, installer)
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 854, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (zc.recipe.egg 1.2.2 (/home/zope/PLUMI/plumi.app/eggs/zc.recipe.egg-1.2.2-py2.7.egg), Requirement.parse('zc.recipe.egg>=1.3.0'), set(['z3c.recipe.scripts']))

There must be something that keeps Viewlets/Diazo/Skin/Rules.xml tied together, but i still can't understand how i can modify the skin structure by adding other viewlets to existing ones, and then have CSS definitions to populate correctly as well.

Running in debug mode is not something you should change in your configuration. It is done at run time. http://docs.plone.org/manage/troubleshooting/basic.html