Does Concrete5 have something similar to Drupal's CCK and Views? How can I create a new custom content type (like catalog or product) in Concrete5?
Concrete5 is more page-focused than data-focused (because its emphasis is on ease-of-editing, and most people's mental model of their website is a bunch of pages, not a single template dynamically populated with content based on input variables etc. etc.).
Hence you treat each page as a "record". Concrete5 has a concept of "page types", which usually are equated to "theme templates", but also serve the purpose of defining a set of data through attributes.
So... you create a page type for the type of data (let's say a product), and you create custom attributes for product meta-data (name, price, etc.). Then to add a product to the system, you just add a new page and choose the "product" page type. This page serves as both the "view" page for that product, and also as the anchor for its data (in the "Properties" dialog when you create or edit the page). Now, instead of a "view" query to present a listing of data, you use the "Page List" block and tell it to only show pages of the "product" page type. To customize the output of the page list, you can create a custom template for it -- in which, among other things, you can output the custom attributes of the page (name, price, etc. -- by calling this: echo $cobj->getCollectionAttributeValue('myattributename'); )
All that being said, there is a plugin available (although it's not free) that works more like CCK/Views: http://www.concrete5.org/marketplace/addons/data-display/
And of course if this is actually for a product catalog, you probably want to use the eCommerce plugin (also not free, but well worth it when building sites for clients who are paying you) -- sorry can't post link due to StackOverflow spam filter, but it's very easy to find in the concrete5 markeplace.
If you have a very complicated and extensive database to display in the website, then Concrete5 is probably not the best tool for the job. But for simpler content-focused sites (for example, artist portfolios, record labels, staff listings under a few dozen people), I find it to be much easier to set up and maintain than more database-focused CMS's such as Drupal (especially if giving to a non-technical client to manage).
Related
For a new project i like to have a single of my custom post type 'teams' as a parent of a custom post type archive and singles 'report' so i would like to have "Teams/{team-name}/reports/{report}".
I've tried to create a custom slug with the 'save_post' action/hook but it didn't work. On the editor page of a report i do have a custom field to select a team but ik look likes this is not usable on the save_post function yet. Does anyone have a suggestion?
Based on what you've indicated in the comments above, I'd be inclined to do away with the http://{website}/Teams/{team-name}/reports/{report} pretty URL and have a more simple http://{website}/Teams/{team-name} URL. It will be more intuitive to remember for visitors.
In the single for the Team CPT, you would include a loop for the archive type associated with the particular team. You COULD create a hierarchy of CPT where Reports are a child of Team but you will be heading down a slippery road that the parent/child relationship creates a lot of overhang when the types become populated.
There are a lot of threads about this, this is just one guys report on what happens when there are many hierarchical CPTs: https://wordpress.org/support/topic/hierarchical-post-type-w-heavy-data-set-fails-lots-of-custom-fields?replies=1
If you could create them as individual (non related) CPTs, and have a common category or taxonomy you could then in the single.php of your CPT include a loop for the archive, or alternatively in the archive for the reports, you could include a team header section. You could link the two on that taxonomy.
On a slightly different tact, if it is just some basic info you want to have about the team on the archive page, you could include a description in the reports taxonomy and depending on your theme (or custom coding) you could display that at the top of the reports archive.
I have a Wordpress-blog with gift ideas where I write text based articles. I recently discovered Custom Post types which I believe is the solution to an feature I want to create.
What I want:
Be able to tag each custom post using the normal "Categories" and "Tags".
Create a 3x3 matrix with product images (custom posts) to be shown on top of each Category-view or Tag-view (followed by the typical article list in the category or tag).
Example:
Lets say I have a category "Gifts for mom" and tags "Pink", "Cheap"
In the category "Gifts for mom" I have 10 text articles (normal posts) discussing the difficulties of buying gifts for your mom
I create nine custom posts, each is a specific gift (e.g. A pink hairbrush). I want to place them in the Category "Gifts for mom" and tag them with "Pink".
When I view myrandomgiftblogname.com/category/gifts-for-mom I want to be able to get a view:
Gifts for mom
Product Product Product
Product Product Product
Product Product Product
Articles:
- This awesome article
- That awesome article
- Etc
I assume this is possible but don't really know where to begin. Could you point me in the right direction? Which Plugins do I need? Do I need to do any programming myself (or just plugin configuration)? Is this even possible?
The description is a bit broad, hence a bit broad answer.
Two things are needed:
1) A plugin to create the Custom Post Type.
It is considered best practice to let CPT's in Plugin territory. So you can swap designs and preserve your CPT functionality. In reality, you are asking for future problems letting this be handled by the theme.
Create your own plugin, which would contain a register_post_type and any extra configs.
Use an existent plugin, like Custom Content Type Manager.
Its Custom Fields features are quite handy as well.
Allows users to create custom content types (also known as post types) and standardized custom fields for each, including dropdowns, checkboxes, and images.
2) Learn how to use and customize WordPress Templates
http://codex.wordpress.org/Templates
Templates are the files which control how your WordPress site will be displayed on the Web. These files draw information from your WordPress MySQL database and generate the HTML code which is sent to the web browser. Through its powerful Theme system, WordPress allows you to define as few or as many Templates as you like all under one Theme. Each of these Template files can be configured for use under specific situations.
You can try the following:
Add a new Page for each category with the exact same name as the category.
In the Images menu attach to each of those pages the images you want.
In your script query for a page with a name identical to the current category, and pull all of its attachments
Is there anywhere online where one can find how to create custom blocks in the same way we can create custom content types in Wordpress. The desired result is to add a block that will allow the user to add/edit custom fields like client name, portfolio description, portfolio thumbnail.
I've created a free tool called "Designer Content" that lets you easily generate these custom blocks:
http://www.concrete5.org/marketplace/addons/designer-content
That being said, it is important to understand this key concept: In Concrete5, everything revolves around PAGES. In general, you want to try to establish an architecture where each piece of data is represented on its own page (a "details" page, which would roughly equate to a single blog post in Wordpress). Then you use the Page List block (usually creating a custom template for it to modify its look) to list out titles, links, and excerpts/photos from each of those "details" pages on a top-level "index" page (roughly equivalant to the home page or category archive in Wordpress).
For example, if you're building a portfolio site, you might want one top-level "Portfolio" page that shows a thumbnail and title of each piece, then a "Portfolio Item Detail" page type that contains one piece per page -- each living underneath the top-level "portfolio" index page.
The benefits of this approach are C5 gives you out-of-the-box tools to manage your "data" (pages) in this way -- users can add, edit, delete, and rearrange the pages via the "Sitemap" in the dashboard. Site search works without any modification -- each page (i.e. portfolio piece) will be its own search result with a link to a specific page. Also you then have more fine-grained control over access permissions if you ever decide to restrict access to only certain groups of people (registered users, etc.).
If you take this approach, you might find the "Page List Teasers" addon helpful (it will let the Page List block -- which you're using for your top-level "index" page -- to show actual content excepts from the pages instead of just a separate "description" field):
http://www.concrete5.org/marketplace/addons/page-list-teasers
Or if you want to dive deeper and customize the page list template even more, I have a starting template with a ton of code comments in it explaining how to do different things here:
https://github.com/jordanlev/c5_clean_block_templates/blob/master/page_list/view.php
But... if you're only talking about small amounts of information and you think a separate page for each one is overkill, then the Designer Content approach I linked to first will work just fine.
You can find a HOW-TO on creating new blocks written by Franz Maruna on the concrete5 website.
Here is the link: Creating a New Block Type
There is also a simple block you can download and install to help you follow the developer tutorials. You can find that here: Simple block template
I'm attempting to build module that allows a user access to manage jobs/departments and post them to our website. It will also allow end users to apply for a given position.
The hierarchy is as follows:
About Us Page (standard drupal page)
-Careers (overview with list of all openings)
-Department Pages (if one or more jobs are available, they'll be displayed here)
-Individual Job posting with form to submit resume
I am currently using two custom tables for jobs and departments.
I have all the administration (CRUD) stuff working just fine -- my question lies in the 'drupal' way of integrating the department pages and individual career pages.
Should I create a custom content type that stores all the job/department data in the node? Or should I keep with my custom tables and integrate with the Path module to setup all the department pages and the application page? Also, what would be the best way to integrate the job application form into the module?
I appreciate any help!
You could create a custom node type for jobs and then create a taxonomy vocabulary for careers with terms for departments inside it so that you can then assign the taxonomy terms to a job. That would be very quick and easy to do.
This also means that you could output nice categorised breadcrumbs using the Custom Breadcrumbs module. Custom Breadcrumbs contains a submodule called Custom Breadcrumbs Taxonomy so you could output career/department information in the breadcrumbs.
You could also use Pathauto to output nicely structured SEO friendly URLS using this method.
Edited to say that with this method you could use Views to show taxonomy term specific lists simply by enabling the taxonomy term View, so you could show all openings at www.example.com/careers and all departmental openings at www.example.com/careers/department-name.
I'm thinking about using WP custom post types to create a basic real estate website.
The post type will be for property listings. I've decided to have one post type for For Sale and one for Rentals, simple because they have somewhat different property information.
A typical listing will need to specify some information, ie, is it a house, an apartment or maybe it's just a piece of land.
What are the pros and cons of specifying this info using custom fields (meta data) versus using taxonomy (categories and tags)?
I can see that it's easy to search based on taxonomy, but custom post types meta data can also be queried.
Also, it seems that this question applies to any post data where discrete choices are required: meta data checkbox, select or taxonomy.
Any thoughts?
Thanks.
My preference for what you're trying to do would be taxonomy for the following reasons:
SEO and User Friendly URLs
With categories and tags, WordPress permalinks are setup to put that information in the URL for you. This will go a long way towards the SEO and usability of your site because you'll be able to create URLs like:
http://yoursite.com/rentals
http://yoursite.com/for-sale/two-bedroom/123-fake-street
Hierarchy
I don't know if you have the need for it, but building a hierarchy with categories is easy. This will give you lots of flexibility when it comes to organizing your posts.
Theme Coding
As you said, it's possible to perform custom queries for meta data, but WordPress has many out-of-the-box functions to query and display based on tags and categories. This will mean that you'll have to write less code to get your theme to do what you want.
I've done exactly what you are talking about, both ways (using Custom Fields versus Categories). My view is you should use a mix - use Categories for the most important information (eg For Sale, Type of Property etc) and use Custom Fields for the actual data for the listing.
Wordpress then has many built in functions to organise that data in a really intuitive way, and allows you to easily group properties of the same type together, in exactly the way a user wants to browse the data.