osCmax v2.5 User Manual
Results 1 to 7 of 7

Is there a way to have modules files in templates?

This is a discussion on Is there a way to have modules files in templates? within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; What I mean is if there is a way to include a module file in a template that is different ...

      
  1. #1
    Member dalogar's Avatar
    Join Date
    Dec 2010
    Posts
    64
    Rep Power
    13


    Default Is there a way to have modules files in templates?

    What I mean is if there is a way to include a module file in a template that is different to that in catalog/includes/modules, so that we can change the look of the modules in each template, like can be done with the content folder.

    Thank you

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Is there a way to have modules files in templates?

    dalogar,

    I did this for the pgm template for v2.0.25 ... basically you need to extend the BTS framework (I am not sure if the code is still in the core or not - although I suspect not) ... it basically works the same as the rest of BTS and looks for the module files in the <template>/includes/modules/ before "falling back" to the core modules.

    The other method is to simply hard code the new paths into your templates (not ideal) but this is what algozone template did - causes many issues ... especially when upgrading.

    The issue becomes where to stop ... otherwise soon enough you end up with everything inside the template folders!

    Regards,
    pgmarshall
    _______________________________

  3. #3
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: Is there a way to have modules files in templates?

    Quote Originally Posted by pgmarshall View Post
    The other method is to simply hard code the new paths into your templates (not ideal) but this is what algozone template did - causes many issues ... especially when upgrading.
    Arrgh! Don't go there. Don't even think about it!
    Quote Originally Posted by pgmarshall View Post
    The issue becomes where to stop
    Precisely

    Whatever happened to KISS philosophy?!
    Hosting plans with installation, configuration, contributions, support and maintenance.

  4. #4
    Member dalogar's Avatar
    Join Date
    Dec 2010
    Posts
    64
    Rep Power
    13


    Default Re: Is there a way to have modules files in templates?

    Quote Originally Posted by pgmarshall View Post
    dalogar,
    I did this for the pgm template for v2.0.25 ... basically you need to extend the BTS framework (I am not sure if the code is still in the core or not - although I suspect not) ... it basically works the same as the rest of BTS and looks for the module files in the <template>/includes/modules/ before "falling back" to the core modules.
    Yeah, this is what I intend, to make templates overriding modules' look WITHOUT touching the core code, in order to be able to update with the oscmax releases.

    I've looked the code in pgm. Yes, it is there, and this template has an includes/modules folder with a product_listing.php file, but it looks like oscmax 2.5 does not care about it. In configure.php and configure_bts.php I see nothing that would make it work.

    Have you (the developers) thought about this feature? I think it would be great to have this implemented, and I think if oscMax intends to have a goog working template sytem it is necessary to have this feature, like you can modify the content pages. So, do you know if it is going to be implemented?

    Regards

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    1 out of 1 members found this post helpful.

    Default Re: Is there a way to have modules files in templates?

    Yes it has been thought about and it is not going into v2.5.

    What we will end up doing is exactly what happens in the core files/infoboxes - splitting out the markup from the modules, so you will have a modules/modulename.tpl.php file in fallback with the markup, but the module is still in the core. Then all you would need to do is create your own custom tpl.php files in your custom template to override fallback. This will entail rewriting all the modules to split out the markup. Too much for this late stage in 2.5 beta testing.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  6. #6
    Member dalogar's Avatar
    Join Date
    Dec 2010
    Posts
    64
    Rep Power
    13


    Default Re: Is there a way to have modules files in templates?

    Yes, it seems too much rewriting for this stage in v2.5. I will look forward in next releases.

    Thank you for your thoughts.

  7. #7
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Is there a way to have modules files in templates?

    I've looked the code in pgm. Yes, it is there, and this template has an includes/modules folder with a product_listing.php file, but it looks like oscmax 2.5 does not care about it
    Yep - this is because the template is designed for v2.0.25 only - v2.5 has a completely new page module controller function.

    So, do you know if it is going to be implemented?
    It has not been discussed nor requested as a feature before ... I only hacked the pgm template together because I wanted more control over things like grid:list switching etc. I have spent the last year integraed most of the new stuff back into the core code.

    Regards,

    Regards,
    pgmarshall
    _______________________________

Similar Threads

  1. Can we get some Templates?
    By driwashsolutions in forum osCmax v2 Customization/Mods
    Replies: 5
    Last Post: 12-17-2006, 05:54 PM
  2. Templates?
    By TCM in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 08-28-2006, 10:35 PM
  3. files under ssl
    By mrocket in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 04-28-2006, 12:30 PM
  4. Problem with modules.php and shipping & payment modules
    By heroyol in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 11-18-2005, 01:33 PM
  5. Where to buy templates
    By harborsales1 in forum osCMax v1.7 Installation
    Replies: 5
    Last Post: 12-10-2004, 04:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •