Test if module exists

Last post 02-28-2006 11:12 PM by codegalaxy. 2 replies.

Sort Posts:

  • Test if module exists

    02-28-2006, 11:38 AM
    • Contributor
      6,910 point Contributor
    • codegalaxy
    • Member since 06-29-2004, 1:00 PM
    • Topeka (Alma), Kansas
    • Posts 1,475

    Is there anyway to test if a module already exists on a page and then have it not be allowed to add to the page

    OR

    remove it on first load if its the second instance of a module?

    Dylan Barber
    read my stupid blog http://codemypantsoff.com
    Pants Optional!
  • Re: Test if module exists

    02-28-2006, 6:00 PM
    • Contributor
      4,577 point Contributor
    • mikeh36
    • Member since 10-05-2002, 12:04 AM
    • Edmonton, Alberta, Canada
    • Posts 918

    I'm assuming you're talking about one specific module you're coding and not any modules in general.

    I'm blueskying here but how about this? On module INIT it checks to see if the logged in user has admin credentials. If "Yes" then you remove the instance of the module from the dropdownlist in the control panel.

    That's the only thing I can think of off the top of my head that wouldn't require a core change.

  • Re: Test if module exists

    02-28-2006, 11:12 PM
    • Contributor
      6,910 point Contributor
    • codegalaxy
    • Member since 06-29-2004, 1:00 PM
    • Topeka (Alma), Kansas
    • Posts 1,475
    actually that quite astute and I will give that a try as soon as I can finish up the more visible aspects of the module
    Dylan Barber
    read my stupid blog http://codemypantsoff.com
    Pants Optional!
Page 1 of 1 (3 items)