Available only from Resources v 1.5
Resources is a Joomla CCK component. And CCK idea is not always easy to understand. One of the best way to understand it, is to see demo content how it is created and organized.
Section Pack is a new feature to share your whole section including related content types, templates, all files, articles and even users if you want to represent demo of multi user section with multiuser demo content.
How to pack Section?
In new Resources 1.5 there is a Tool set plugin. If you install it and publish, you will see in Tools section of resources backend "Section Pack" button. Click it and in popup set pack parameters and click "Apply". that is all. Parameters are so easy no need to explain them. And if you meet parameter you not understand, just point mouse over the label of the parameter and you will see tooltip with a hint.
Multi Section Packs
What is Produced?
Section Pack tool will produce Joomla installation package. That means, to install this pack, one have to use Joomla Install/Uninstall Section. Also great thing about it is that if you flow "KEY" rules this package will rather update than install new section on every install process if this pack have been already ever installed.
The produced installation package file you may find in /administrator/cache/ folder
What KEY rule?
Every pack have it is unique key. That allow pack update. It means that if you create pack version 1.0 and then 1.1 the last pack will be rather update for those who already installed pack 1.0. It means it will not create new section but update section that was created on installation of pack 1.0.
Every key is created using Joomla installation secret key which you can find in global configuration. It means unless you reinstall Joomla or explicitly change Joomla secret key every Pack you produce will support updates.
So if you reinstall Joomla and you want to continue distribute the same pack but updates you have to explicitly change Joomla secret to one from previous Joomla installation.
If you made changes or you use custom template with calling fields explicitly, you mast include template into package. Please do not pack templates you did not change and used from our template pack. Because included templates are renamed and it will create copies of the same templates.
To be sure your templates will be packed correctly, you need to be sure that templates are conform to latest rules on creating custom templates. Here is the list:
- If in template parameters you have links to fields directly, the parameter name should have field_ in it. For example mgt_map_field_address.
- All fields you call explicitly in list, article or form templates should have ->fields->result. Where 23 is an ID of the field. This line will be altered in to ->fields[$new_id]->result. Because IDs of the fields are different on new installed Joomla. ifields object will not be sported.
- All files, images used by template should be in folder with the same template name. For example for list joomla_blog template folder name would be default_subtmpl_joomla_blog. If you store all files there you may be sure it is packed and on template copy also copied.
- All CSS code should be in your template name css file. Example: default_subtmpl_joomla_blog.css. And this file will be automatically linked.