How can I check what module 'type' is in use? - Joomla! Forum - community, help and support
hi all
i developing custom template has quite few module positions, far goo d .
for more flexibility , ensure correct html used, want have several positions check if module assigned position menu or else.
how can check if module being loaded position menu, or search box or login module? output html depending on type being used in position.
i can necessary code ifs etc, not sure use check if module specific type of module.
thanks
gw
i developing custom template has quite few module positions, far goo d .
for more flexibility , ensure correct html used, want have several positions check if module assigned position menu or else.
how can check if module being loaded position menu, or search box or login module? output html depending on type being used in position.
i can necessary code ifs etc, not sure use check if module specific type of module.
thanks
gw
i'm not sure understand,
https://docs.joomla.org/jdoc_statements
https://docs.joomla.org/jdocumenthtml/countmodules
https://docs.joomla.org/jmodulehelper/getmodule
you'll have iterate on modules in given position, , perhaps check data provided. don't think modules have type "user" or "blah", they're modules. there custom html modules, specific joomla system modules, custom ones can't cover possibilities. can key off menu vs non menu ones looking @ module object data likely, other can't group modules types because there's infinite custom modules have.
harcoding module names in bad idea, best case menu vs non menu module, you'd have clean generic re-usable code. , in 1 of links sent shows it's easy key off menu modules name or data contain.
https://docs.joomla.org/jdoc_statements
https://docs.joomla.org/jdocumenthtml/countmodules
https://docs.joomla.org/jmodulehelper/getmodule
you'll have iterate on modules in given position, , perhaps check data provided. don't think modules have type "user" or "blah", they're modules. there custom html modules, specific joomla system modules, custom ones can't cover possibilities. can key off menu vs non menu ones looking @ module object data likely, other can't group modules types because there's infinite custom modules have.
harcoding module names in bad idea, best case menu vs non menu module, you'd have clean generic re-usable code. , in 1 of links sent shows it's easy key off menu modules name or data contain.
Comments
Post a Comment