Best way to add custom page template to C5?
Permalink
I have a form that I want to add to the website I am converting over to C5. I don't want to make it a block as there really is no need to make it a block (with it's call to mysql overhead).
In other words little is likely to change in this form block now or in the future so there is no sense making it editable.
I created a template for my site in general by just saving the normal output rendering that appears in a browser when viewing the home page and calling it "default.php" (along with making a couple of minor modifications to C5 it).
But now that I have created default.php what is the best way to create another template page only this time containing the form in question?
In other words I want to use the basic default.php template as is but with this new template page including the form HTML. If I ever change the default template I want the change to be incorporated automatically into my form template page (except for the form code which I don't want changed).
Is there a way to do that in C5?
Thanks.
Carlos
In other words little is likely to change in this form block now or in the future so there is no sense making it editable.
I created a template for my site in general by just saving the normal output rendering that appears in a browser when viewing the home page and calling it "default.php" (along with making a couple of minor modifications to C5 it).
But now that I have created default.php what is the best way to create another template page only this time containing the form in question?
In other words I want to use the basic default.php template as is but with this new template page including the form HTML. If I ever change the default template I want the change to be incorporated automatically into my form template page (except for the form code which I don't want changed).
Is there a way to do that in C5?
Thanks.
Carlos
Make an external form
Hi Mnkras,
Hmm...well...I tried that but an external form is a block (if you meant an external form block). Something I did not want to create or use as there is no need to use a block (with it's mysql overhead).
What I want to do is create a single page with my form in it but I want that single page to be displayed using the template I have defined inside default.php inside my theme.
It doesn't display that way right now. It just displays whatever is inside my single page...well...page but does not appear with my theme around it.
This is all still rather confusing as to which file does what and where I am supposed to do things.
Carlos
Hmm...well...I tried that but an external form is a block (if you meant an external form block). Something I did not want to create or use as there is no need to use a block (with it's mysql overhead).
What I want to do is create a single page with my form in it but I want that single page to be displayed using the template I have defined inside default.php inside my theme.
It doesn't display that way right now. It just displays whatever is inside my single page...well...page but does not appear with my theme around it.
This is all still rather confusing as to which file does what and where I am supposed to do things.
Carlos
The amount of overhead for that is not noticeable
Now that you mention it Mnkras that is undoubtedly true and given that I only have a few blocks on my pages (a content block and an autonav block) one more block is not going to make any noticeable difference.
Still...there is no reason to make it a block (my contact form will never be edit at least by an end user). A single page is the ideal construct I think except for the fact that I want to make a single page for use on this site that uses the site template and is rendered as such.
In other words the single page would have my contact form for content and just be the rest of the template for the remainder of the page.
But how to create a single page that renders with the site template...that is the question.
I can always just copy the template I have inside my default.php file and stick it into the view.php file for my single page but that makes two files I would have to update if there was a change to the template and I am trying to avoid that.
I know that I may be overly complicating this but I want to do things the best way possible so that I can better instruct others on the ways of C5 in the future.
Carlos
Still...there is no reason to make it a block (my contact form will never be edit at least by an end user). A single page is the ideal construct I think except for the fact that I want to make a single page for use on this site that uses the site template and is rendered as such.
In other words the single page would have my contact form for content and just be the rest of the template for the remainder of the page.
But how to create a single page that renders with the site template...that is the question.
I can always just copy the template I have inside my default.php file and stick it into the view.php file for my single page but that makes two files I would have to update if there was a change to the template and I am trying to avoid that.
I know that I may be overly complicating this but I want to do things the best way possible so that I can better instruct others on the ways of C5 in the future.
Carlos
If you make a single page not in the dashboard then it will have the active theme, thats what the view.php is for.
Hmm...that's not been my experience Mnkras. I must have messed something up.
If you wouldn't mind doing so Mnkras can you review another thread I started here on creating a single page with my theme appearance?
If not that's no problem Mnkras but I explain things as to what I am more fully there and just don't want to repeat what I said in that thread on this one.
The thread ishttp://www.concrete5.org/community/forums/customizing_c5/instructio...
Regardless thanks for the input you have given me.
Carlos
If you wouldn't mind doing so Mnkras can you review another thread I started here on creating a single page with my theme appearance?
If not that's no problem Mnkras but I explain things as to what I am more fully there and just don't want to repeat what I said in that thread on this one.
The thread ishttp://www.concrete5.org/community/forums/customizing_c5/instructio...
Regardless thanks for the input you have given me.
Carlos