Redirection on entry
Permalink
Hi all,
This is my first post so please be kind :)
I have just started with C5 and, having played with a few other PHP Frameworks and CMS's this one looks great!
As a quick intro, I am a PHP/MySQL/XHTML (old style I guess now) coder and need to ask a very basic question, havong followed some of your excellent tutorials over the past week or so, I have implemented my newest project to utilise the C5 CMS, however, I have a few questions.
First and (again I apologise in advance if you have answered this a few gazillion times before) most important.
I set up a template using a working design as per the tutorials listed on the C5 site, and set up the initial page as default.php, however when I visit the site as a guest obviously the first page that loads is the default.php file, is there a way to redirect the default to the Home page of this site or is it better to make the default.php file effectively the sites home page and build the other pages as children to that? I am a little concerned about using Auto-Nav.
And secondly is it wise to remove all http-equiv meta tags and then include them on each page in the page properties section of the specific files( should the content meta tag i.e. Text/html remain in the pages header.
I would appreciate a gentle response as I am new to C5 ( I have already read through 50 + pages of forum posts without finding a specific answer before starting this thread
With kindest regards
Jon
This is my first post so please be kind :)
I have just started with C5 and, having played with a few other PHP Frameworks and CMS's this one looks great!
As a quick intro, I am a PHP/MySQL/XHTML (old style I guess now) coder and need to ask a very basic question, havong followed some of your excellent tutorials over the past week or so, I have implemented my newest project to utilise the C5 CMS, however, I have a few questions.
First and (again I apologise in advance if you have answered this a few gazillion times before) most important.
I set up a template using a working design as per the tutorials listed on the C5 site, and set up the initial page as default.php, however when I visit the site as a guest obviously the first page that loads is the default.php file, is there a way to redirect the default to the Home page of this site or is it better to make the default.php file effectively the sites home page and build the other pages as children to that? I am a little concerned about using Auto-Nav.
And secondly is it wise to remove all http-equiv meta tags and then include them on each page in the page properties section of the specific files( should the content meta tag i.e. Text/html remain in the pages header.
I would appreciate a gentle response as I am new to C5 ( I have already read through 50 + pages of forum posts without finding a specific answer before starting this thread
With kindest regards
Jon
Hi,
Thank you for your response jelthure I think I understand what you mean, I guess I need to read up on pagetypes a bit more I am still trying to understand how page types work, I understand that in the case of no page type being matched then it will use the defult.php pagetype as defined in the template but I am not sure how it all relates to the url eg if I want sayhttp://www.mysite.com/c5 to be the entry point how can I ensure that it loads the page I want as opposed to default.php
Thank you for your response jelthure I think I understand what you mean, I guess I need to read up on pagetypes a bit more I am still trying to understand how page types work, I understand that in the case of no page type being matched then it will use the defult.php pagetype as defined in the template but I am not sure how it all relates to the url eg if I want sayhttp://www.mysite.com/c5 to be the entry point how can I ensure that it loads the page I want as opposed to default.php
First start by making a "c5" folder under the root of your website then move your concrete5 files into your new directory. then open up your site config file (root/config/site.php) and look for the line with:
define("BASE_URL", "http://www.yourwebsite.com");
now edit that line to read:
define("BASE_URL", "http://www.yourwebsite.com/c5");
save. Now when you go tohttp://www.yoursite.com/c5 it will load your concrete5 site.
Then in your theme folder under the theme you are currently using create your "homepage" page type. you can copy the code in the default.php file to start if you want.
then login to your concrete5 site and go to Pages and Themes, then click the "Inspect" button under your theme. on this page you will see the pagetype in the list and can activate it, do so.
then go to the sitemap, click on "Home" or what ever you have named it and select "design". then select your "homepage" page type from the row and click save.
done. now the first page or "home page" of your site will use your new page type.
The name of the page type files has nothing to do with the url your visitors will see.
hope this helps
EDIT: the post parser thingy on this forum is hacking up the code blocks and for some reason i can't get a txt file to attack so leme know if you have trouble understanding it.
define("BASE_URL", "http://www.yourwebsite.com");
now edit that line to read:
define("BASE_URL", "http://www.yourwebsite.com/c5");
save. Now when you go tohttp://www.yoursite.com/c5 it will load your concrete5 site.
Then in your theme folder under the theme you are currently using create your "homepage" page type. you can copy the code in the default.php file to start if you want.
then login to your concrete5 site and go to Pages and Themes, then click the "Inspect" button under your theme. on this page you will see the pagetype in the list and can activate it, do so.
then go to the sitemap, click on "Home" or what ever you have named it and select "design". then select your "homepage" page type from the row and click save.
done. now the first page or "home page" of your site will use your new page type.
The name of the page type files has nothing to do with the url your visitors will see.
hope this helps
EDIT: the post parser thingy on this forum is hacking up the code blocks and for some reason i can't get a txt file to attack so leme know if you have trouble understanding it.
Thank you both,
It works, I am gradually getting an idea of how it all fits together, but I am sure I will have some more questions as this project develops.
It works, I am gradually getting an idea of how it all fits together, but I am sure I will have some more questions as this project develops.
as for the meta tags if you would like the ability to have different metta tag values keywords, content, etc, for different pages then yes remove them from the template. if you want all your sites pages to have the exact same tags and values then add them in the template.
hope this helps.