Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me

TOPIC: php file for sub-template of Module K2 content

php file for sub-template of Module K2 content 9 months 4 days ago #54441

I would like to include a "Module K2 content" in my frontpage. But I would like to customize it by applying it a sub-template.

I´ve applied before a template to item.php on a specific category successfully by adding a sub-folder in /componentes/com_k2/templates (different from default) and editing the item.php on that folder.

When I´m editing the module "Module K2 content" there is an option to apply a sub-template. As I have seen, if I create a sub-folder in /templates/*current-template*/html/mod_k2_content/ it appears in the sub-template option, but I don´t know what is the php file that I need to edit in order to customize the "Module K2 content".
Please become a member of OSTraining to reply to this post.

php file for sub-template of Module K2 content 9 months 4 days ago #54442

Sorry! I´ve already find the answer. It´s default php.
I have added a sub-folder not on /templates/*current_template*/html/mod_k2_content but directly on /modules/com_k2_content/tmpl and it works. And the copy the default.php and customize it.

Just to know if I´m right... the difference between put under the /templates/*current_template*/ or directly on /modules it´s that it would be applied just when a template is selected (in the /templates...) or always available (on /modules...)

And another question. how can I add a custom css for this modules?
Please become a member of OSTraining to reply to this post.

php file for sub-template of Module K2 content 9 months 4 days ago #54462

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
You can create a css file override in a very similar manner to what just did.

Here are some joomla docs that show you the procedure.
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core
docs.joomla.org/Understanding_Output_Overrides

Also there is a shortcut method using a plugin that might make things easier.
extensions.joomla.org/extensions/style-a...ign/templating/14053

Let us know if you have more questions.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

Sign Up for OSTraining

Powered by Kunena Forum

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.