Plone 4: Customize News Item as folder - plone

How can I customize News Item content type to behave like a folder (accept files, folders as children)?
/portal_types/News%20Item/manage_propertiesForm
Changing Allowed content types seems to have no effect.

Try searching for collective.folderishtypes, that provides "Folderish News Item". Then look for 'folderish' at http://docs.plone.org for further reading. At this moment, using Dexterity to customize content types is better for future upgrades.

Related

Add meta data to a Drupal page that isn't in the CMS?

I'm new to Drupal and I'm having to work on a site coded by another developer.
We have found and installed the Metatag module in order to give us access to change metadata on content inside the CMS. This is great for most things, however there are some types of content (not sure the exact Drupal terminology here) such as Testimonials and Case Studies. Each individual testimonial and case study has their own area in the CMS to edit the content, and these each have the Metatag module area to give us control over the metadata.
These types of content also have 'index pages' on the front-end (e.g. website.com/testimonials which lists all testimonials). Does anyone have any ideas as to where I can edit the metadata for these pages?
They're not in the CMS as classic pages and there seems to be nowhere to use the Metatag module to edit the metadata.
Either being able to update the metadata in the CMS or just hard-editing the template files would be an acceptable option.
These index pages can be created with various methods. It’s likely that they are created by the Views module or with the Taxonomy core module.
According to its description, the Metatag module seems to be capable of providing metatags for Views pages:
Customize meta tags for custom pages built using Panels and Views using included submodules.
With the Metatag Views Overview module it’s possible to edit the metatags for Views pages on Metatags’s overview page.
If nothing else works, it seems to be possible to provide metatags based on paths:
Customize meta tags for specific paths (or other conditions) using Context and included Metatag:Context submodule.

Custom title for existing Dexterity content type

I have a Plone site using a local product which is common across several of our projects that provides a Dexterity content type which is entitled "Generic". I'm using it in a somewhat different way, however, so I'd like the content type to appear as "Specific" in the add content menu. (It's not necessary for the add/edit path to contain the adjusted type name.) Is there a programmatic way I can change the title for my installed version of the type?
Not sure if this is the best approach, but I've added an importStep that does:
portal_types['common.package.ContentTypeID'].title = 'Specific'

Plone: insert line between News items in Collection view

We are using Plone 4.1.3. We have a folder called News containing News items. In the folder, we have collection also called News. The default view of the News folder is set to the News collection. And in News collection, we set the default to Item: News and All Contents. The end result is we get a page showing the five most recent News items when we click on the News folder with page numbers below linking to older News items. The body of the News items is also displayed, but there is not line or border between each News items.
Question: How can we configure Plone or Collection or News Items to automatically insert a horizontal line between each News item body when they are displayed in the Collection view?
Thank you very much in anticipation.
cmgui
You can have this behaviour with a simple mix of maquillage and stylesheets :)
..You can custumize the appearance of your Plone site in 3 ways:
edit the main plone's stylesheet in a skin layer in the zmi (fastest and worst method)
create your own plone theme with a plone package (old fashioned but evergreen)
create your own plone theme with Diazo and its corresponding Plone integration plone.app.theming (latest trend and quite easy to start with if you are not yet a Plone developer)

Drupal: Template Files, Modules and Content Types for Advanced Theme

Intro
I am in the process of trying to convert my first HTML/CSS design into a theme for Drupal. I have used ModX for quite a few designs and appreciate the ability to create different page templates and custom variables to be assigned to those templates. However I seem to be having some issues making the transition.
The site I am working on theming in Drupal is for a real estate agent. Each page/section will have a different set of content associated with it and will need to display only that content. For example, there will be a page for current listings, each of which will be formatted by a custom content type. However, when I call the content on the home page (or on other pages) I do not want to see this listing data.
Layout
The layout of the site and the regions associated with each page/section is as follows:
Home
Spotlight
Featured 1
Featured 2
About
Spotlight
Bios - Profiles of each agent (each will be a node with name, contact info, pic, etc) listed on the page; multiple nodes listed
Sidebar
Listings
Spotlight
Listings - Profiles of properties (each will be a node with locations, basic info, pic, etc) listed on the page; multiple nodes listed
Sidebar
Services
Spotlight
Content - general paragraph text area
Sidebar
News/Blog
News/Blog Items - List of stories with summaries and links to full article
Sidebar
Each page/section will use the same header and footer.
Issue
I have done some reading on Drupal, custom content types (and CCK), Views, and Pathauto. However I have not been able to get a clear picture of how to put it all together to accomplish what I am attempting. What I really would like to know is which modules to use, how best to use them, which elements I need to use where, and what template files I should be using to theme the elements I need to use. Any help or reference to useful resources would be much appreciated.
This is a rather general question, and your description is a kind of vague on important distinctions like page vs. site section vs. page region. That said, some general advice: start by installing the admin module. Then get all your content generally in the right places with someone else's theme, e.g. Garland, before you start doing any of your own theming. You should be able to get pretty far without touching code. Use CCK to define your content structure. You should already have a type for page and it sounds like you'll want to add a type for feature, bio, listing, and blog post. Depending on the details, you may need to add some additional field modules, e.g. if you have images, you'll probably want the imagefield module.
Once you have the content types defined, configure pathauto, and start adding content.
Once you have some content, you'll want to create some lists of it with views. You may want to start with the simpleviews module, as the views UI can be overwhelming. Save your views as block display, and then use the blocks admin to put the in the right page region, and configure them to show up only on the right pages.
At that point, you'll want to start controlling how the individual items (nodes) look in different contexts. That's when you start theming. For that, I'd install the devel module, look at what other themes do, and call dsm() on any variables you don't understand to see what they look like.
You can generally get quick help with specific questions on the Drupal IRC channels.
The easiest way to do what you want to do may be to put your custom content in blocks and set the access settings for the blocks to be only on certain pages. So, for instance if you have content that you want to appear at /spotlight or /node/22 or such, you would just create a custom block (Site Building -> Blocks) and then in the settings, set the block to only show for that node.

Is there option to have powerful URL and Aliases in Drupal, not the poor one that I've found?

First of all I want to state that I've just started with Drupal so I'm a noob.
I'll try to explain what I think is a powerful URL and Alias system.
Lets say we have some structured content with some subcontent shared between main sections.
The main sections could be Visitor, Customer and Website. Now every main section has it's own menu with subsections. Let's say Visitor has Basic informations, Products. Customer has Products, Reports and Website has Basic information and Contacts. So logically the URL for content should look like this:
1.0 example.com/visitor
1.1 example.com/visitor/basic_informations
1.2 example.com/visitor/products
2.0 example.com/customer
2.1 example.com/customer/products
2.2 example.com/customer/reports
3.0 example.com/website
3.1 example.com/website/basic_informations
3.2 example.com/website/contacts
The content Products in Visitor and Customer, Basic information in Visitor and Website is the same. So it's shared (aliased) between these main sections.
And my question is how to do it Drupal are there any modules or configuration that results in this structure?
What have I found and think that doesn't do the job!
Module Pathauto: Yes it creates alias that is nicer than the ugly node/xx name, but it doesn't care about the parent section so everything look like this:
example.com/visitor
example.com/basic_informations
example.com/products
example.com/customer
example.com/reports
example.com/website
example.com/contacts
You can configure pathauto to include sections in various ways. If you go to the alias settings in pathauto (www.example.com/admin/build/path/pathauto), you can set the paths there.
Expand Node path settings and then expand the replacement patterns option below it. If you have a menu with customer, visitor and website as the main links you can enter in a patten like [menu-path-raw]/[title-raw] - this will put the section in first.
Alternatively, if that menu structure doesn't work you could use taxonomy - set up a taxonomy with those three main options and add sub-categories to them as needed. Then in path-auto enter in [term-raw]/title-raw] - this again will give you the url structure you want.
I might be wrong, but as long as the parent-child structure is built correctly in the menu options, shouldn't CleanURLs take care of that? Don't bash me if I'm telling something stupid, as I'm unable to activate CleanURLs and confirm that...
EDIT: If not, maybe try the module called Global Redirect...

Resources