The linked_modules are imported into the context for this module so their content is available for use. You might use a $module->link() or print($module->summary), etc. Order doesn't matter.
The related links show up in the "Related Links" sidebar, in the order they are listed in the array.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, now I get it, so concievably on could build other functions in the $module class to do more with the content that is in the module. Cool (I am bugging you today aren't I) and all the pages are just aspects of the index page with the content for the right module switched in. So changes to the look and feel only have to happen in that place (though the only changes I might make at this time would probably come in the css)
Nice and easy,
thanks again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
so in the module page does one need to define the module uniquely (in the samples you have the module name sample_1 and the object defined as $sample_1) or is in only required that the module name be unique?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<pre>
function module($key = ""
,$title = ""
,$link_text = ""
,$linked_modules = array()
,$summary = ""
,$content = ""
,$related_links = array()
) {
</pre>
What is the role of linked_modules and related_links? are the linked_modules ones that you might link to in the page?
Where to the related_links come into play?
is the order important?
Sam D
Good questions.
The linked_modules are imported into the context for this module so their content is available for use. You might use a $module->link() or print($module->summary), etc. Order doesn't matter.
The related links show up in the "Related Links" sidebar, in the order they are listed in the array.
Ok, now I get it, so concievably on could build other functions in the $module class to do more with the content that is in the module. Cool (I am bugging you today aren't I) and all the pages are just aspects of the index page with the content for the right module switched in. So changes to the look and feel only have to happen in that place (though the only changes I might make at this time would probably come in the css)
Nice and easy,
thanks again
Exactly - the modules just encapsulate the data at whatever abstraction level you want to use and allow for re-use.
so in the module page does one need to define the module uniquely (in the samples you have the module name sample_1 and the object defined as $sample_1) or is in only required that the module name be unique?
The module names must be unique, the name of the key is the name of the module and the name of the module file must match the name of the module.