• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Absolute path in making templates

#1
[eluser]Unknown[/eluser]
Hi. Recently I decided to make a Template system for my CMS. As CodeIgniter is URL friendly default, I should pass every URL to my main page as absolute path. Everything is doing well but there is a problem that I faced it yesterday. If I want to make template system I should separate each template in a folder with their styles, images and etc. I did it myself with PHP with an include it's easy not tough. But as CI is in a MVC mode I should get each View and then use it, now I stored my templates In views folder and I get the main page. Therefore because everything is in views I cannot access the images, styles or anything else in that folder while My page is loaded because I loaded it by View in my Controller.

The only solution that I found is putting image and others in the root folder which is next to the application and system folder. I want to path them as where they really are (Template Folder).

Thanks! sorry for writing too much.


Messages In This Thread
Absolute path in making templates - by El Forum - 10-10-2011, 01:27 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.