The fast answer is that there is no complete list of those tags. Magento doesn't use a strict grammar for XML files because they can be extended without any trouble. Looking at the 1.4 codebase, I performed the following command from a terminal.
The fast answer is that there is no complete list of those tags. Magento doesn't use a strict grammar for XML files because they can be extended without any trouble. Looking at the 1.4 codebase, I performed the following command from a terminal: cd /path/to/magento grep -r global/ .2>/dev/null | grep -v pearlib | grep php | sort And got back about 75 lines where the global config path is invoked specifically.
Some of these are simple: global/page/layouts global/pdf/totals global/template/email global/payment/cc/types And others are far more obscure: global/catalog/product/type/configurable/allow_product_types global/helpers/core/encryption_model global/widget/related_cache_types On top of that, there are several which are invoked dynamically, such as your mentioned routers, rewrites, etc: global/models/'. $model. '/resourceMode global/'.
$groupType. 's In fact, I even found 4 references in my own extension code that added to the global space. Knowing all that, a complete reference of valid global tags would be a misnomer, and will likely change even during minor updates.To your last point, you cannot go forward with complete assurance that you will be in compliance w/ Magento's configuration model.
Do your best to use the objects that are provided with the library, use samples from the rest of the app when possible, and forge ahead bravely when no help is given. :) Hope that helps! Thanks, Joe.
First of all, thanks Joe, for your wonderful answer to my post. I tried the above command of yours in my server's terminal, but it returned nothing; instead it showed my the command prompt again. Can you please tell me as to how & where I can run the above command, so that I can see some of the "global" tag lines myself?
– Knowledge Craving May 14 '10 at 5:29 Edited to include commands you'll probably have, though you'll need to be on Linux to perform them. If not, use whichever IDE you're familiar with and search for the string "global/". – Joseph Mastey May 14 '10 at 13:40 Really I admire your knowledge in finding things using Linux.
I tried your command & saw that there are 75 lines where "global" tag is being used. If more custom modules exist, they will get added up to this list, making more lines. – Knowledge Craving May 15 '10 at 7:30.
As Joseph said, there is no definite list of possibilities. My suggestion to you is to just start going through Magento's config. Xml files.
Just open up /app/code/core/Mage/ and then each folder inside there is a core module. So, Sales for instance. Open up Sales/etc/config.
Xml and see what they've done. You can learn a ton just by looking at what Magento has already built. When I stopped trying to ask everyone questions and started inspecting and learning from the code that is already there, that's when I really started to progress in my understanding how everything works.
In fact, an important thing to keep in mind when developping for Magento, is that all the config. Xml files are concatenated to give an output of one unique XML file which contains all nodes taken in all config. Xml files of all modules.
The fact is, as Joseph said, that Magento does not use any strict grammar. We could say that the grammar is created by developpers themselves. For example, if in your module, your config.
Xml defines : Foo Any other module which defines the same node () can add a subnode and to this node, and your module will also be able to access this new node. The better to understand what are the nodes used for, is to read the Core code. A good way to start understanding the way config.
Xml are parsed by magento is reading app/code/Core/Mage/Core/Config.php. Understanding the way the function Mage::getStoreConfig() works, is a good way too. Hugues.
Important point highlighted, thanks. But still why will "mynode" tag be interpreted by Magento? There must be some sort of parser determining what set of tags will be properly interpreted by the Magento core code.
– Knowledge Craving May 19 '10 at 4:26 The "mynode" tag is not interpreted by magento. It is just present. And you can access to it with this function : Mage::getConfig()->getNode('mynode/myconfigvar'); If you want to access from your module to the node : 111 defined in config.
Xml of Customer module just type : Mage::getConfig()->getNode('global/fieldsets/customer_account'); – Hugues ALARY May 19 '10 at 8:51 whoops.. sorry, I'm new to StackOverflow, didn't know that paragraphs' not respected in comments. – Hugues ALARY May 19 '10 at 8:55.
Instead of looking for strings that explicitly specify individual locations you can dump a list of existing tags. As others have pointed out it's an ever changing list so this just gives you an idea. I often use a script like this when exploring... getNode('global'); foreach ($global->children() as $node) { echo $node->getName(), PHP_EOL; }?
Using the Magento's config. Xml files you can gohead with your core function. It is very useful to read and verify the functions.
Then, we approach you make use of tags with code module. Thanks®ards.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.