Menu

on module call

Help
Sam DeVore
2004-03-15
2004-03-15
  • Sam DeVore

    Sam DeVore - 2004-03-15

    <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

     
    • Alex King

      Alex King - 2004-03-15

      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.

       
      • Sam DeVore

        Sam DeVore - 2004-03-15

        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

         
        • Alex King

          Alex King - 2004-03-15

          Exactly - the modules just encapsulate the data at whatever abstraction level you want to use and allow for re-use.

           
          • Sam DeVore

            Sam DeVore - 2004-03-15

            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?

             
            • Alex King

              Alex King - 2004-03-15

              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.

               

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.