View previous topic :: View next topic |
Author |
Message |
vain Smarty Rookie
Joined: 20 May 2006 Posts: 23 Location: Berlin / Germany
|
Posted: Wed May 24, 2006 7:28 pm Post subject: directory structure / multi-theme |
|
|
i have serveral questions related to the directory structure and the multi-theming approach.
my project uses a main-template folder, where header.tpl / footer.tpl / copyright.tpl are located:
Code: | /project/template
/project/template/config
/project/template/cache
/project/template/template_c |
and template folders for each separate modul
Code: | /project/moduls/modulname/template
/project/moduls/modulname/template/config
/project/moduls/modulname/template/cache
/project/moduls/modulname/template/template_c |
i access the templates via an array:
Code: | $smarty->template_dir = array( BASEDIR. '/moduls/' . $modulname . '/templates/', BASEDIR. '/templates/'); |
1. do i have to create separate /cache and /template_c folders for each plugin? or can i use the mainfolder?
2. what are my options to create suport for multi-theming depending on this directory layout?
3a. is it possibile to have a global-themes and modul-themes?
3b. can they overrid each other? something like:
if globalthemeA then guestbooktheme=standardBlue
if globalthemeB then guestbooktheme=globalthemeB
4. for which problem and when do i have to use a compile_id? |
|
Back to top |
|
mateusfig Smarty Rookie
Joined: 27 Aug 2006 Posts: 24
|
Posted: Fri Sep 01, 2006 4:35 pm Post subject: Re: directory structure / multi-theme |
|
|
vain wrote: | i have serveral questions related to the directory structure and the multi-theming approach.
my project uses a main-template folder, where header.tpl / footer.tpl / copyright.tpl are located:
Code: | /project/template
/project/template/config
/project/template/cache
/project/template/template_c |
and template folders for each separate modul
Code: | /project/moduls/modulname/template
/project/moduls/modulname/template/config
/project/moduls/modulname/template/cache
/project/moduls/modulname/template/template_c |
i access the templates via an array:
Code: | $smarty->template_dir = array( BASEDIR. '/moduls/' . $modulname . '/templates/', BASEDIR. '/templates/'); |
1. do i have to create separate /cache and /template_c folders for each plugin? or can i use the mainfolder?
2. what are my options to create suport for multi-theming depending on this directory layout?
3a. is it possibile to have a global-themes and modul-themes?
3b. can they overrid each other? something like:
if globalthemeA then guestbooktheme=standardBlue
if globalthemeB then guestbooktheme=globalthemeB
4. for which problem and when do i have to use a compile_id? |
I'm very interested on your question also, buts seems nobody reply us. Could u send me your e-mail so that we coul talk about this subject?
________
MEDICAL MARIJUANA STATES
Last edited by mateusfig on Sun Feb 13, 2011 2:57 am; edited 1 time in total |
|
Back to top |
|
mateusfig Smarty Rookie
Joined: 27 Aug 2006 Posts: 24
|
Posted: Tue Sep 05, 2006 9:28 pm Post subject: |
|
|
why nobody reply? please anybody could help me on this too?
________
Yamaha Yzf-R1 History
Last edited by mateusfig on Sun Feb 13, 2011 2:58 am; edited 1 time in total |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Sep 05, 2006 11:02 pm Post subject: |
|
|
Try searching the forums first. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Sep 06, 2006 1:37 pm Post subject: |
|
|
Quote: | do i have to create separate /cache and /template_c folders for each plugin? or can i use the mainfolder? |
Any time you use a single templates_c and cache_dir for multiple template_dirs, you will want to set a unique compile_id for each one, usually just md5() the path to each template_dir works for the id.
Quote: | what are my options to create suport for multi-theming depending on this directory layout? |
I like to use one template_dir, compile_dir and cache_dir for everything, and handle the multiple templates via template variables, such as {include file="$template/layout.tpl"}
Maybe have a look at this:
http://www.phpinsider.com/smarty-forum/viewtopic.php?t=7310 |
|
Back to top |
|
mateusfig Smarty Rookie
Joined: 27 Aug 2006 Posts: 24
|
Posted: Fri Sep 08, 2006 7:45 pm Post subject: website struct |
|
|
what about this structure:
Code: |
-|project_root
--|LIB
---| ...
---| ...
---| ...
--|MODULES
---|mod_1
---|mod_2
--|TEMPLATES
---|tpl_cache
---|tpl_config
---|tpl_compile
--|THEMES
---|theme_1
----|modules
-----|mod_1
------|style
------|js
------|templates
------|images
-----|mod_2
------|style
------|js
------|templates
------|images
---|theme_2
----|modules
-----|mod_1
------|style
------|js
------|templates
------|images
-----|mod_2
------|style
------|js
------|templates
------|images
|
I'd like opnions on this structure i created to organize a multi-theme website. What is wrong, etc...
Into MODULES folder, there goes only the php files for each module. The js, css (style), images needed for the entire website was placed into LIB (classes, fucntions, js, css and packages like smarty). Then it means everything is common is in LIB and everything regarding a only module, is into THEME/theme_name/modules/mod_name
thanks in advance
Mateus
________
Justin bieber fan
Last edited by mateusfig on Sun Feb 13, 2011 2:58 am; edited 1 time in total |
|
Back to top |
|
bj9 Smarty Regular
Joined: 08 Sep 2006 Posts: 57
|
Posted: Sat Sep 09, 2006 7:06 am Post subject: |
|
|
I think, it's the best structure.
Tough I have nop modules, but pure templates, I like this structure also. Mine is like that:
Code: |
-|project_root
--|LIB
---| ...
---| ...
---| ...
--|TEMPLATES
---|tpl_cache
---|tpl_config
---|tpl_compile
--|THEMES
---|theme_1
-----|style
-----|js
-----|templates
-----|images
---|theme_2
-----|style
-----|js
-----|templates
-----|images
|
|
|
Back to top |
|
mateusfig Smarty Rookie
Joined: 27 Aug 2006 Posts: 24
|
Posted: Sat Sep 09, 2006 1:43 pm Post subject: |
|
|
bj9 wrote: | I think, it's the best structure.
Tough I have nop modules, but pure templates, I like this structure also. Mine is like that:
Code: |
-|project_root
--|LIB
---| ...
---| ...
---| ...
--|TEMPLATES
---|tpl_cache
---|tpl_config
---|tpl_compile
--|THEMES
---|theme_1
-----|style
-----|js
-----|templates
-----|images
---|theme_2
-----|style
-----|js
-----|templates
-----|images
|
|
oh, cool! thank you for your reply. i was witing anxious for this.
i will wait more comments about my structure so that i can close my analysis on it. but i think i will use it as soon. and i see at least w/ another guys else me, it works fine. i tried make the best to separate and organize everything on this structure.
________
Marijuana vaporizers |
|
Back to top |
|
|