Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9208009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:31:07+00:00 2026-06-18T00:31:07+00:00

I am building an application that allows a user to browse html templates. The

  • 0

I am building an application that allows a user to browse html templates. The html template will be displayed in a preview area (source code will be obfuscated), and although the template will contain inline CSS/JS, there will also be the odd linked image asset.

For this reason, I thought it might be best for me to just store them as a library of folders, and retrieve the flat file from my server for display, as opposed to storing the HTML in the database and having to organise the external assets too.

My question is: Where in the CakePHP directory structure, is the best home for these files? I’d rather keep them above the webroot, and I’m thinking View.

Any ideas? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:31:09+00:00Added an answer on June 18, 2026 at 12:31 am

    I would suggest that you keep all the out-of-cakephp-framework related files, stored under the webroot.

    My suggestion is the following directory structure for saving the html template as well as the css and js related files.

    /webroot/files/templates/<template-project-name>/<the-actual-file>.html

    Any external css, would then be under
    /webroot/css/templates/<template-project-name>/<the-actual-css>.css

    And the JS libraries would be under
    /webroot/js/templates/<template-project-name>/<the-actual-js>.js

    Use a seperate layout file (call it preview_layout.ctp) which simply renders
    the template file as it is.

    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an application that allows the user to create a Human model (graphical
I am currently building a Flash AS 3.0 application that allows a user to
I'm building an application that allows the user to POST HTML5 canvas data that
Currently I am building a small application that allows a user to sign in
I'm building a web application that will allow team collaboration. That is, a user
I am building a web application that allows a user to upload an image.
I am building a simple C# application that allows the user to edit the
I am building a web application that allows the user to upload high res
I'm building an application that needs to allow a user to insert text from
Background: We're building an application that allows our customers to supply data in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.