-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi, Robert!
Robert Guerra wrote: | So I do a bit of researching, i also read the configuring MidCOM and | MidCOM components section of the docs, and then realize that what I have | to do is change or update the schema used by the net.nemein.rss snippet | so that it has the category definition.
Ok, here's where you went wrong. Net.nemein.rss is the news aggregator tool in Midgard. However, it is not the system that powers your blog.
So instead, you should take a look at the de.linkm.newsticker component, which is what your blog uses.
| "category" => array( | "description" => "Category", | "datatype" => "text", | "location" => "parameter", | "widget" => "select", | "widget_select_choices" => array ( | "cat1" => "Privaterra", | "cat2" => "Midgard", | "cat3" => "Travel", | "cat4" => "Security", | ), | ),
OK, this looks like a correct category field definition (although I'd use more descriptive keys than "cat1" etc).
What you need to do next is to copy the default de.linkm.newsticker schema from the component API reference and add your own field definition there.
You can find it from http://www.midgard-project.org/documentation/reference/components/de.linkm.newsticker.html it is the <pre /> area starting with:
"default" => array ( ~ "name" => "default", ~ "description" => "News Article",
Copy that area into a text editor (or just your clip board), and add the category block you've made into the "fields" array. A good place to do that would be between "title" and "abstract".
Then you need to store this new schema definition into your Midgard setup as a snippet.
Go to Aegir, select the "Snippet" tab from the left, and create a snippet directory named "sitegroup-config". Then under that create another snippet directory named "de.linkm.newsticker" by clicking "New" on the right-hand frame's menu.
This is the default location used for MidCOM's configuration. You don't need to follow that convention but I'd recommend it.
Now that you have the snippetdirs created, click "New" (again in the right-hand frame), and create a snippet named "schema-blog", and paste your schema array there.
Then you need to configure your newsticker to use the new schema. Here you have two options, either set it to be used by all "newsticker" folders on your site, or only your blog.
To use it for all newstickers, create another snippet named "config" in the /sitegroup-config/de.linkm.newsticker directory, and in that snippet place the following:
"schemadb" => "/sitegroup-config/de.linkm.newsticker/schema-blog",
If you want to enable it for only one newsticker folder (or override the default specified above), you can do this by going to the newsticker folder on site, and clicking the "Component configuration" toolbar item. Scroll down the form, and enter your schema's path in the "Path to the schema database" field: /sitegroup-config/de.linkm.newsticker/schema-blog
Now your blog should have categories enabled. I'm not sure how Ecto handles them, but probably the next time you refresh your posting list there, the category selections should appear to the editor. At least that is how it works in MarsEdit. The categories will also appear in the RSS feed generated from your blog. But they won't yet appear on your site. For that you need to modify the output templates of your blog, and that is the subject of another lesson :-)
Note: the steps needed for adding simple category support to your blog might sounds exceedingly difficult. However, it has to be kept in mind that you can use the exactly same technique for controlling all data structures on your site (adding new content fields to articles, photos or whatever). There is more information about modifying schemas in: http://www.midgard-project.org/documentation/howto/midcom/schemas.html
/Bergie
PS. If it is of any help, my Blog's schema is visible in: http://bergie.iki.fi/archive/configuration/blog.html
I'll try to add more info there, like the layout templates used.
- -- Henri Bergius [EMAIL PROTECTED] Consultant Partner Tel: +358-20-198 6032 Nemein Oy http://www.nemein.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB5tLzNkT8k497k9IRAucYAJ99FCzn15Y/2VYTVsPC3prfweL2lQCfaPiy kzSOzxgX/uDn+2d1jg8kP9s= =Cg1o -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
