Custom title for existing Dexterity content type - plone

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'

Related

Adding a customised listing section to a WordPress page

I’m fairly new to building customised templates in WordPress and would appreciate any suggestions.
In our WordPress website, we have a section ‘Members’ built using Custom Post Type UI & Advanced Custom Fields plugins, which renders similar to a listing. In the back-end the Marketing Coordinator goes to the Member section and ‘adds a new Member’ then entering the name, image and description. The member, when published, then appears on the members page Templated page.
The page is templated to Members, in the Members template a flexible layout is referenced, that is then referencing individual members.
Individual members > flexible layout > Member template.
I would like to copy this design for an awards section, so that it is easy for copy editors to input the copy.
The only problem is that the flexible and repeater fields are no longer used on the Advance Custom Fields.
So I need to find a solution to an already built section that I will be able to add and remove, plus custom sort, before updating the plugin and build another section in the same way.
It seems to now be available in the Pro version, which when reading the documentation for the free version states that flexible and repeater is deprecated! Not available in Pro!

Tweaking Plone Dexterity Container View

I have a custom plone dexterity content type which is a container of other dexterity types. I have added an additional view to recursively summarize the contents of this type.
I'm needing anonymous users to be able to navigate to the default view like normal, but then also be presented with a link to this summary view. I do not wish to rewrite the default view from scratch, but just add a simple hyperlink to it. I have read the dexterity manual, but I cannot seem to make the leap to how to pull off something like what I'm trying to do.
Any recommendations?

Drupal 7: Add view to content type

I've been making a template for a particular content type, but just ran into a problem: I need to embed a view into the content type.
I am aware this can be done via several different methods, but I don't see one that fits exactly my needs:
I need the view added automatically for all pages of that content type.
Using blocks in a region is not an option, as I want to avoid defining a region in the middle of a page that should only be available for a specific content type.
Translatable label.
Possibility to freely apply a template to all fields in the content type (excluding the embedded view).
I tried doing it via page layout (Panels) and simply adding node content fields and the view to my layout regions, but then I get another problem: I can't style my content fields without doing something that seems a bit over the top:
Currently I have about 20 different content fields in the content type that are wrapped in HTML and styled in my template file. I have a translated label for each of these in the template file. From what I can tell I'd have to add a template for each of the panes containing content fields to add my translated labels and HTML needed to style each field.
I'm not really fond of making 20 templates, 20 theme hook suggestions to get the templates to work and 20 regions in the panel layout just to get a view inserted in the content type.
Am I doing something terribly wrong here? Any suggestions?
You may want to try the Viewfield module or similar modules (search for "view field" or "view reference").
If you are doing something more complex like changing/filtering the view based on some value in your content type, then you may have to use Viewfield module in combination with something else that will help fill in the filter values.
I've never done something like this before so I'm not sure exactly what module combination would work but Rules or Computed Field come to mind as possible helpers.
You have to use "views node field" http://drupal.org/project/viewsnodefield, after installing this module you have to select the "Node content" in the display (like blocks,page). then click the add display. if you want to display the content like this page http://www.richtown.ae/?q=content/arabian-ranches then you have to download the views_galleriffic module and install it and choose the style option "Galleriffic Gallery". You can choose the content type by using the filter in the views.
That's it cheers
i implemented this in my website richtown.ae
if you still unclear please send me the email social#richtown.ae i will reply you & ready to help you we can share information
i am using this module in drupal 6.
I resorted to using the EVA module ( http://drupal.org/project/eva ).
In addition to Woodgnome's answer
Let's say you have a content type named 'Product'
You want to attach a view to it.
Here are the steps using the eva module :
On your view edit page :
Section Displays
+Add : Eva field
Section ENTITY CONTENT SETTINGS
Entity type:Node
Bundles:Product
That's it, going to a node product type will now display the view

drupal-----add a field to the content type story

now, i want to add a dead time field(the style is 02-12-2010) to the content type story. how to do that, i used the hook_form_alter() and format_date(),but when i created a new article,and select the time.but the time can't show on the article's page.why?
Why don't try contributed modules instead?
A more elegant solution I think will be using the CCK module which provides the ability of adding new fields to content types (as well as creating new content types), you can install then the Date module provides you with the ability to attach date fields to content types.

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.

Resources