Of course... well I already set up the site some months ago. Now that I'm implementing couch I see lots of new options .
Since I'm not that versed in php and other "advanced" coding my options are a bit limited, but this is the way I handled my sites in the past:
I usually start with the coding/designing of one single page of the website I want to create. If the layout is done I split the html in three parts: head.html whatever.html and foot.html. I go then ahead and create the other pages for the site on basis of whatever.html.
Using php I then include head.html, foot.html and the respective html that should get displayed. This way, when I add something to the navigation, change something in the layout etc I only have to edit head.html or foot.html and the modifications apply for every page.
To have "pretty" urls I create for every page a different folder. In each is the same index.php, which loads a globalindex.php. Again to just have to change one file if I have to.
The page I'm working on was a bit tricky since it features at least two different languages. Before implementing couch each language folder contained its own content. So at first I included every folder/index.php for every language. This left me with a lot of pages in the admin panel . Also, I had always two entries shown for every page. One featuring the german content, one the english. But I prefer to just have one entry shown in the panel, with editable regions for both german and english. Then I had the idea to create special pages for couch just to manage the content, with every page having editable regions for both languages (non-executable, since they just have the editable regions). This way I just have to determine what language the site should be shown in and load the content I need. The structure looks now as follows:
When now a page gets accessed, e.g. .../de/contact/ the index.php gets accessed, of course. Then globalindex.php loads and determines the language and the page that should get displayed. It includes head.html and foot.html together with contact.html from /_content/. contact.html accesses /_php/cms_contact.php - the couch file for contact - and loads the content in the selected language.
So much for short .
But who would I be if I wouldn't have some new questions?
Since I'm not that versed in php and other "advanced" coding my options are a bit limited, but this is the way I handled my sites in the past:
I usually start with the coding/designing of one single page of the website I want to create. If the layout is done I split the html in three parts: head.html whatever.html and foot.html. I go then ahead and create the other pages for the site on basis of whatever.html.
Using php I then include head.html, foot.html and the respective html that should get displayed. This way, when I add something to the navigation, change something in the layout etc I only have to edit head.html or foot.html and the modifications apply for every page.
To have "pretty" urls I create for every page a different folder. In each is the same index.php, which loads a globalindex.php. Again to just have to change one file if I have to.
The page I'm working on was a bit tricky since it features at least two different languages. Before implementing couch each language folder contained its own content. So at first I included every folder/index.php for every language. This left me with a lot of pages in the admin panel . Also, I had always two entries shown for every page. One featuring the german content, one the english. But I prefer to just have one entry shown in the panel, with editable regions for both german and english. Then I had the idea to create special pages for couch just to manage the content, with every page having editable regions for both languages (non-executable, since they just have the editable regions). This way I just have to determine what language the site should be shown in and load the content I need. The structure looks now as follows:
- /_content/ - the name is confusing. Here are the html's who get the content from couch and where the layout of each page's content is determined
- /_css/ - thats clear
- /_php/ - holds the globalindex.php which puts each page together, some other .php's, head.html and foot.html, and all the "special couch pages"
- /couch/ - clear
- /de/ - the "pretty" urls for german , with all the "dummy" folders containing the same index.php
- /en/ - same as /de/, but for english
When now a page gets accessed, e.g. .../de/contact/ the index.php gets accessed, of course. Then globalindex.php loads and determines the language and the page that should get displayed. It includes head.html and foot.html together with contact.html from /_content/. contact.html accesses /_php/cms_contact.php - the couch file for contact - and loads the content in the selected language.
So much for short .
But who would I be if I wouldn't have some new questions?
- When I change/delete an editable region form a clonable template it still shows when I create a new entry. I only get the "cleaned" version when I delete the template from couch and implement it again. All previous entries would be lost. Is there some other solution if I need to change a cloneable template in the future?
- Can I have more than one comments "database"?(In the admin panel there is "users" and "comments") E.g. I have two or more different comment-forms, depending on the needs/situation. Is it possible to have an "approval page" for each different form? Or rename the existing "comments" in something different?
I will misuse the comments option to register for seminars and it would be really nice if they could be kept seperatly . - Is it possible to create a login option on the actual page or is the only way to login through the couch index?
I mean something like this: Login: [......] Password: [......] somewhere in the head of a page.