Reputation: 546
I've created a custom coponent for joomla and I've created a menu which uses that component and set a template for that menu. The thing is when I go to the url test.com/index.php?option=com_mycomponent, it still uses the default template instead of the template that I set it to.
in short: The component works, only it's using the wrong template.
Upvotes: 2
Views: 252
Reputation: 5012
FP is right-on about the Itemid. In addition, you can also append a &template=[templatename] to the URL to force any component in Joomla to use the specified template.
Upvotes: 1
Reputation: 3510
You are missing the Itemid
for the menu item in your URL. The Itemid
is what Joomla uses to look up the menu item, which is what your secondary template is assigned to. Without the Itemid
, Joomla uses the system defaults.
If you have the search engine friendly links turned on, Joomla will look up the corresponding menu item in the database for you. In that case, you would not have to specify the Itemid
, but you would have to use the menu item's URL as the base instead of index.php?option=com_mycomponent
.
Upvotes: 1