question about creating a simple custom theme

Discussion in 'Templates customization' started by dale_sellers, Nov 18, 2014.

  1. dale_s

    dale_s aMember Pro Customer

    Joined:
    Apr 12, 2013
    Messages:
    96
    I am trying to get a basic understanding of using the custom themes feature, instead of hacking core files. I've looked and looked at the tutorial ( http://www.amember.com/docs/Themes_and_Templates ), but I'm still confused.

    If I need to edit this file:
    amember/application/default/views/signup/signup.phtml

    And I have created a custom theme folder here:
    amember/application/default/themes/custom/

    1. Where in the custom theme directory should the edited version of signup.phtml be located?

    2. Also, I only need to have signup.phtml override the original file. Is is necessary to include any other files in the custom theme, to make the custom theme work, if this is my only intention?

    3. Last, I have "Use wordpress theme" enabled. Would the answers to the questions above still be the same?

    Thanks for any clarification.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You need to copy to your folder only files that you want to alter. aMember will use default templates as last resort and use it if did not find template in your theme. You need mimicry file structure in your theme folder. So answer to your questions is:

    1) amember/application/default/themes/custom/signup/signup.phtml
    (same path after view folder, please note same approach works for templates from additional modules)

    2) you only need to copy files that you want to update.

    3) In most cases yes but there is one exception - layout.phtml file. In case of option "Use wordpress theme" aMember uses layout.phtml file from plugin folder. So you can use same approach for all templates except layout.phtml
  3. dale_s

    dale_s aMember Pro Customer

    Joined:
    Apr 12, 2013
    Messages:
    96
    Thank you. Your answers make perfect sense. Already set theme up, tested it, and it seems to work.

Share This Page