0
Welcome Guest! Login
0 items Join Now

How do I use Gantry Toggle in my own admin pages?

  • How do I use Gantry Toggle in my own admin pages?

    Posted 13 years 1 week ago
    • I'm using MissionControl on my backend and Ionosphere on the front end, so I'm fully Gantry-enabled.

      I'd very much like to use the toggle element in my own backend components. I would like to do this in code, however, as my admin pages are all done in code and not using the Joomla elements system.

      The closes I've come is this:

      $p = new JParameter('');
      $g = new JElementGantry($p);
      $t = new JElementToggle();
      $node = new GantrySimpleXMLElement('<yes></yes>');
      echo $g->fetchElement('gn', 1, $node, 'cn');
      echo $t->fetchElement('thename', 1, $node);

      This draws the toggle, but it's not active, even though it appears that all of the JS and CSS are brought in via the use of JElementGantry().

      I'm certain there's a proper way to do this, however.

      Help?
    • Christopher Ambler
      https://bit.parts

Time to create page: 0.059 seconds