Hi All,
I'm new to this forum but not to WeBuilder. I have used it since 2007. I'm a big fan!
I use many php includes in my sites, but I'd like to graduate to having more of a MASTER page to make larger sites even more tolerable to update (like a .dwt). If a master is not really possible, I'd at least like to know if anyone has used includes for web page headers from the doctype on down if that's possible. I saw a few posts regarding preprocessors, but I'd like to see an example. That would really help me!
Thanks in advance,
WoodGeek
create a master (dwt like) file in WeBuilder 2010
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
Please try to follow these guidelines. This will help to receive faster and more accurate response.
- Check the Support section of the corresponding product first. Chances are you will find your answer there;
- Do not create new topics for already reported problems. Add your comments to the existing topics instead;
- Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
- Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
- Include the version number of the software you are using;
- This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
- Karlis
- Site Admin
- Posts: 3605
- Joined: Mon Jul 15, 2002 5:24 pm
- Location: Riga, Latvia, Europe
- Contact:
Re: create a master (dwt like) file in WeBuilder 2010
There is an article about preprocessor in the help file.
Code preprocessor allows you to use certain dynamic content elements in your plain HTML. These elements are updated each time you save the file.
For example, you can insert date stamp that is automatically updated each time you save the file with WeBuilder.
Currently Supported Elements
Date stamp
Syntax:
<!--%DateStamp%--><!---->
Example:
<!--%DateStamp%-->2008.04.11.<!---->
Time stamp
Syntax:
<!--%TimeStamp%--><!---->
Example:
<!--%TimeStamp%-->2008.04.11.<!---->
File include
Syntax:
<!--%IncFile filepath%-->
<!---->
Example:
<!--%IncFile c:\my web\header.htm%-->
<!---->
you could use this last part:
<!--%IncFile c:\my web\header.htm%-->
<!---->
But easier still would be to use PHP techniques.
Code preprocessor allows you to use certain dynamic content elements in your plain HTML. These elements are updated each time you save the file.
For example, you can insert date stamp that is automatically updated each time you save the file with WeBuilder.
Currently Supported Elements
Date stamp
Syntax:
<!--%DateStamp%--><!---->
Example:
<!--%DateStamp%-->2008.04.11.<!---->
Time stamp
Syntax:
<!--%TimeStamp%--><!---->
Example:
<!--%TimeStamp%-->2008.04.11.<!---->
File include
Syntax:
<!--%IncFile filepath%-->
<!---->
Example:
<!--%IncFile c:\my web\header.htm%-->
<!---->
you could use this last part:
<!--%IncFile c:\my web\header.htm%-->
<!---->
But easier still would be to use PHP techniques.
Re: create a master (dwt like) file in WeBuilder 2010
Thanks Karlis,
I had searched the help file for "master" and "dwt", but not "preprocessor". Thanks also for your suggestion that php includes would probably be easier.
I never had a site so large before that I needed to use includes for the header! (I mostly use them for navigation, etc.).
Also, I will try to do most anything so that I don't have to use a commercial product where too much is done for me. I like working under the hood and writing the code myself. I can learn more that way.
I will try a test php header and see how it goes!
thanks,
-WoodGeek
I had searched the help file for "master" and "dwt", but not "preprocessor". Thanks also for your suggestion that php includes would probably be easier.
I never had a site so large before that I needed to use includes for the header! (I mostly use them for navigation, etc.).
Also, I will try to do most anything so that I don't have to use a commercial product where too much is done for me. I like working under the hood and writing the code myself. I can learn more that way.
I will try a test php header and see how it goes!
thanks,
-WoodGeek
Re: create a master (dwt like) file in WeBuilder 2010
What I do is to build the page as I need, then after is tested, I split it into pieces:
head.php
header.php
nav.php
footer.php
at least. Some times I need more.
later, I modify the file with includes and save all the pieces and the original and test.
Then, the next pages are built upon this template I just made.
head.php
header.php
nav.php
footer.php
at least. Some times I need more.
later, I modify the file with includes and save all the pieces and the original and test.
Then, the next pages are built upon this template I just made.
Re: create a master (dwt like) file in WeBuilder 2010
Thanks Notuo;
I do that too, but have never used includes for the head (doctype, etc.).
I used Dreamweaver years ago and would still like to have a master doc where I can change/rearrange my pages.
(We moved to a database driven site later as it grew.) I may have to bite the bullet and go that way too.
Thanks for your response.
-WoodGeek
I do that too, but have never used includes for the head (doctype, etc.).
I used Dreamweaver years ago and would still like to have a master doc where I can change/rearrange my pages.
(We moved to a database driven site later as it grew.) I may have to bite the bullet and go that way too.
Thanks for your response.
-WoodGeek