Skip to content

How to show module titles when using with Pages? #786

Answered by johanjanssens
manojLondhe asked this question in Q&A
Discussion options

You must be logged in to vote

1. params

The <ktml:modules ... > tag doesn’t support params=“<?= json([‘showtitle’ => 1], true); ?>” Params only exists for a module and are defined when you instantiate the module.

The right syntax would be:

<ktml:modules position="pages-footer-2" showtitle="1">

2. showtitle

A title in Joomla is not rendered by the module. It’s rendered by the module chrome. See: https://github.com/joomla/joomla-cms/blob/staging/templates/system/html/modules.php

You can pass the info to chrome in as a style attribute, for example:

<ktml:modules position="position-2" style="xhtml">

This will render the title. This works in the same way as the jdoc:include counterpart in Joomla.

<jdoc:include type="modules" 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by johanjanssens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants