title: Best way for theme folders structure in Code Igniter?
body: <p>I want to make my web app theme-able. There are 3 ways I researched:</p>
  
  <h2>Solution 1:</h2>
  
  <pre><code>- application
      - views
          - theme1
              - template files
          - theme2
              - template files
          - admin template
  - css
      - theme1
      - theme2
  - js
      - theme1
      - theme2
  - images
      - theme1
      - theme2
  </code></pre>
  
  <p>It is working well. However it is not comfortable when placing files in separated folders.</p>
  
  <h2>Solution 2</h2>
  
  <pre><code>- application
      - views
          - theme1
              - css
              - js
              - images
              - template files
          - theme2
              - css
              - js
              - images
              - template files
          - admin template
  </code></pre>
  
  <p>And I changed /application/.htaccess to</p>
  
  <pre><code>RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]  
  </code></pre>
  
  <p>It is also working well, but is it good for security? (i'm not good at .htaccess)</p>
  
  <h1>Solution 3</h1>
  
  <pre><code>- application
      - views
          - admin template
  - themes
      - theme1
          - css
          - js
          - images
          - template files
      - theme2
          - css
          - js
          - images
          - template files
  </code></pre>
  
  <p>And I changed views path to theme folder in MY_Loader.</p>
  
  <p>It looks like better structure. I have an issue with admin template.
  Becuse I want also to place admin template files in folder views as a core system,
  I don't know how to make views load function can see files in both of place.</p>
  
  <p>Could everyone please advice me for the best solutions.
  Thanks and Best Regards,</p>