Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    429
    Thanks
    0
    Thanked 20 Times in 20 Posts

    quick theme question

    Can template themes be placed outside the webroot then loaded by php? I ask because I know templates can but themes and javascripts are normally linked to directly.
    NO Limits!! www.dhcreationstation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com

  • #2
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,378
    Thanks
    8
    Thanked 1,075 Times in 1,066 Posts
    Is this a WordPress question?

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,460
    Thanks
    0
    Thanked 632 Times in 622 Posts
    Quote Originally Posted by c1lonewolf View Post
    Can template themes be placed outside the webroot then loaded by php?
    Yes provided that the content management system you are using caters for it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Posts
    429
    Thanks
    0
    Thanked 20 Times in 20 Posts
    @mlseim - no not wordpress.

    @felgall - please explain..
    "Yes provided that the content management system you are using caters for it".

    I'm building my own content management system, so how would I go about the "caters for it" part? Special php script like those image viewer scripts?
    NO Limits!! www.dhcreationstation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,460
    Thanks
    0
    Thanked 632 Times in 622 Posts
    Quote Originally Posted by c1lonewolf View Post
    so how would I go about the "caters for it" part?
    Simply have the script reference the files containing the template from whatever location you like.

    Any files accessed on the server rather than being passed as references within the web page can be accessed from anywhere on the server by specifying a relative path to their location. It is only file references that are part of the final web page (such as JavaScript and CSS files references in <script> and <link> tags) that need to be within the web root.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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