How to hide the plone 4.3 site default logo - plone

I need to to know how to replace/hide plone 4.3 default logo using my own viewlet. my viewlets.xml file is under profiles/default and i registered viewlets using generic setup like
<genericsetup:registerProfile
name="default"
title="bdr.theme"
directory="profiles/default"
description="Installs the bdr.theme package"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
But it does not call the viewlets.xml file to hide the default plone site plone logo. What i have to do for achieving my goal. Is it Possible in plone 4.3 or not. I m trying this so long. Any one pls help me.

You can do the following:
Install z3c.jbot
Create the logo in a file called plone.app.layout.viewlets.logo.pt and move it to the jbot override directory.

You need to run run the profile in order for the viewlets.xml to apply.

You hide the logo viewlet by opening ##manage-viewlets. This will show all the viewlets and you can just click the "hide" link.
After that you can export the setup from GenericSetup, and it will give you a viewlets.xml you can use.

you can change your logo using py file like
first create overrides.zcml in ..plone/product/overrides.zcmlfor replace logo
<browser:viewlet
name="plone.logo"
manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
class=".browser.home.logo"
permission="zope2.View"
/>
import LogoViewlet class from plone/app/layout/viewlets/common.py
inherit that class into your class .redirect any pt file using index .now that pt file contents are replaced plone logo
from plone.app.layout.viewlets.common import LogoViewlet
class logo(LogoViewlet):
index = ViewPageTemplateFile('templates/logo.pt')

Related

DSpace 6.2 Document Item View Customization

I am trying to customize the View Item tab on my repository and add styling.
The default style looks like this.
To one sort of like this one.
I've tried modifying the _item-lists.scss file under /[source]/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/ but there's no change.
The file responsible for these changes is the item-view.xsl file found in [source]/dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/

Joomla css hide date create

I want to hide the date on this page.
I tried to change it inside joomla but I couldn't. It's not an article but a JKit page and there is no such an option.
I used the "inspect element" feature to find the corresponding css file and line (bootstrap.css #554). When I change the element through the "inspect element" menu its working but when I open the css file and change it, it doesn't work.
Any suggestions how I can hide it?
p.meta {display: none;}
That ought to do it. Granted, any other metadata will also be hidden. You should add this to a custom CSS file and not modify core Joomla or extension files.
I find it hard to believe that jKit doesn't have a setting for that. (Update: I see that jKit is very new and lacks good documentation.) Also, a template override might be more to your liking.
Most Joomla components allow you to control things like this in the options for the items and also in the menu options when creating a menu link (or setting the global options to change the default behavior. If this component does not, make either an alternate layout or a template override (depending on whether you want to always change this or just on this one page). If you go into the template manager, template view there is a system in place that will automatically create a copy of the layout and put it in the right location. Just edit that to show what you want.
Ok so I solved by editing the according .php file of the component.
I just removed the echo line of the date.
Nothing else worked.

Extra toolbar in content in silverstripe

How to add simple tool bar in silverstripe in content like heading h1,h2 etc. I want to add a simple css class there.?
Any help is accepted. Thank you
Supposing you want to configure the TineMCE HTMLEditorfield have a look at the tinytidy module. You'll have to copy the configuration example to your mysite/_config.php to make it working.

CKEditor image properties tabs disappear

I'm having an issue with CKEditor regarding image properties. Spent many hours investigating this but ended up without solution.
I'm using Drupal 7 with the latest CKEditor AND IMCE.
When I click on the image icon on CKEditor tool bar, the image properties popup window came up but I was looking at the "advanced" tab is not showing up. No tab show up at all.
Is there any configuration that I have to apply in order to show up the tabs in the image properties?
you can try by reinstalling with ckeditor - 7.x-1.16 and imce - 7.x-1.9,
worked for me
I got this trouble when use cdn version of ckeditor instead of local.
To fix it download latest ckeditor from official site http://ckeditor.com/download. I have downloaded full version. Then copy files to /sites/all/modules/ckeditor/ckeditor. Before you copy here must be only 1 file with name COPY_HERE.txt. After copy folders adapters, lang... etc.
Then go to the global settings of the ckeditor admin/config/content/ckeditor/editg and set path to the local ckeditor library like this: %m/ckeditor. Save settings and check if advanced tabs exist now.

How to override Plone's display menu for special case content?

To get a one-off view on a Plone folder I do something like this (not all code shown):
In configure.zcml:
<!-- Marker interface. Set this on the folder through the ZMI
interfaces tab.
-->
<interface interface=".interfaces.IMySpecialFolder" />
In browser/configure.zcml:
<!-- Special case view. Set as the folder's view through the ZMI
properties tab (layout property).
-->
<browser:page
for="..interfaces.IMySpecialFolder"
name="special"
template="special.pt"
permission="zope2.View"
/>
This works great, but I would like to control the folder's display menu to list only my special case view. I can add it, and it shows up only on my marked folder, but I have to change the site-wide ATFolder FTI.
In browser/configure.zcml:
<include package="plone.app.contentmenu" />
<browser:menuItem
for="..interfaces.IMySpecialFolder"
menu="plone_displayviews"
title="Special view"
action="##special"
description="Special case folder view"
/>
In profiles/default/types/Folder.xml:
<?xml version="1.0"?>
<object name="Folder">
<property name="view_methods" purge="False">
<element value="special"/>
</property>
</object>
Of course I cannot remove the existing available view methods without affecting every folder on the site.
Is there a way to do this one-off display menu tweaking without changing a content type's FTI?
Actually, it seems like this problem has been tackled before. p4a.z2utils patches CMFDynamicViewFTI to get the list of available views from an IDynamicallyViewable adapter lookup. (dateable.chronos uses this mechanism for its folder calendar views). So my question becomes:
Is there a way to do this one-off display menu tweaking without changing a content type's FTI and without patching Plone?
The plone display menu builder uses ISelectableBrowserDefault to get available options in the Display menu (see
http://dev.plone.org/plone/browser/plone.app.contentmenu/trunk/plone/app/contentmenu/menu.py#L220)
So I think (but I haven't tried this) that if you define an adapter for a more specific interface (in your case IMySpecialFolder) that provides the Products.CMFDynamicViewFTI.interface.ISelectableBrowserDefault it should work.
The adapter should have the methods required by plone.app.contentmenu.menu.DisplayMenu above.
Answering my own question, I've realised that the most straightforward way to achieve one-off folder views is to follow the pattern Plone itself applies in the Members folder: a PythonScript index_html that calls the custom view, e.g.
member_search=context.restrictedTraverse('member_search_form')
return member_search()
Products.CMFPlone illustrates how to setup such a PythonScript with a GenericSetup import handler.
In retrospect I realise I didn't need the marker interface in my question scenario. It's not necessary here in the answer either.
Note that this solution doesn't result in "the folder's display menu listing only my special case view" as I asked, but does away with the display menu altogether. I'm fine with that.
One way you could have solved it is using traversalhook to register menu items, or in this case, unregister menu items, or register menu items with conditions that make them not appear. With the traversal hook you can use a marker interface to make it just happen in a certain folder, subsection or page.
You can see where we implemented similar code here
https://github.com/collective/collective.listingviews/blob/master/src/collective/listingviews/browser/views/controlpanel.py#L105
In this case we just wanted to register new display menu items dynamically based on control panel configuration.

Resources