WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Editing and Location of HTML/CSS Source

<< < (3/4) > >>

Argos:
@ PurpleEdge: while it is true what you tell, you make it too difficult for the poster. The "problem" he faces I think is that he cannot find the template files in his local installation. Of course, that is logical, as he installed a template from the repository, so he only sees a zip file.

@ port_user: all templates are in the /templates directory in both local and server installation. When you install a new template, normally the template only is unzipped on the server, and you won't find it in your local installaton (unless you manually unzip it there). There is no separate HTML/CSS for each page, all pages use the same source code that is in the template. That's one of the differences with non-CMS sites.

What you want to do is to edit the template. There are 3 ways:
1. edit online, using a module like http://www.websitebakers.com/pages/admin/admin-tools/webbase-edit.php. Of course you can work offline first, and then paste the new file content in the online editor. This is rather cumbersome, and not very efficient.
2. work offline, and rezip and reinstall the template after each change. This is also rather cumbersome, and not very efficient.
3. work offline, and upload the new files with FTP. This cannot be done if you installed the template through the admin first, as the file user is different. Best is to uninstall the template, and then upload it with FTP in the templates directory. Then in the admin go to Add-ons > Advanced (small link in upper right corner) > Admin Settings (last option in the big menu) > check the Templates box, and click on Reload. This can be done only once, and after that all changes can be done offline and uploaded with FTP. This is the way I always work. I work offline in Dreamweaver and upload changes with FTP. It's easy, fast and user friendly.

Luisehahne:

--- Quote ---1. edit online
--- End quote ---

The best way to edit online ist the Addon File Editor you find here

http://www.websitebakers.com/pages/admin/admin-tools/addon-file-editor.php

Dietmar

port_user:
Thank you PurpleEdge and Argos. Yes, friendliness to beginners is the foundation of open-source community...

I actually figured out most of my naive questions. As I understand, WB templates do not contain HTML files. All HTML code is in PHP files, index.php being the most important one. So, I did some HTML editing using index.php file. In fact, saving HTML source from the browser would not help, as HTML files could be delivered to the front end only using PHP functions. So, any HTML template file (in WB) must be linked to PHP functions - elementary for experts(if I am correct) but may help beginners...

I also made a mistake copying and pasting text from Word to WB editor - this somehow change the appearance of the template itself.

Here is what I still do not understand:

I cannot fully edit template.css file. I can edit only one section related to <div id="wrap"> in the index.php. The rest - background, images, anything at all does not change whatever I do to the template.css. There is another file in this (1024px) template - style.css - but is seems to me completely redundant old copy, as it's not referenced in index.php file. Any comments?


Note: I am not sure what Argos means by "There is no separate HTML/CSS for each page." I can change the style (not the template structure) for each page separately through the page settings (for example I chose 'All CSS' for one page).

Regards

PurpleEdge:
Argos, thank you for those tips, they are things I never knew about and will save me from having to un-install and re-install templates!

port_user - I have not seen the 1024 template so I don't know which css files it uses? Rename ths style.css to something else - that will soon show you if it is used or not, and don't forget to clear your browser cache Ctrl-F5.

And you are correct, each page can use a separate template, or the default template which I think is what Argos was trying to explain.

Argos:

--- Quote from: port_user on December 31, 2009, 09:18:57 PM ---As I understand, WB templates do not contain HTML files. All HTML code is in PHP files, index.php being the most important one.

--- End quote ---
Yes, index.php is in fact the only php file you should touch in almost every WB template. You should not edit other .php files as a beginner. Only index.php and of course the stylesheet(s). The index.php is really not much more than an HTML page with some php tags to respresent content, menu, and some variables. You can edit the file in any editor. If you read the help docs about converting a HTML file to a WB template file, you will better understand what's going on. It's really easy once you understand the principles.


--- Quote ---I also made a mistake copying and pasting text from Word to WB editor - this somehow change the appearance of the template itself.

--- End quote ---
You should never paste Word code into the editor, as you will paste MUCH very bad typical Word code into the content, which will almost certainly wreck your content layout. However, it does NOT affect the template. This crucial. In the editor you put content. The content is represented in the template by a single content tag. So you changed the appearence of the content, but not the template. You should try to understand this fundamental separation of template (=layout and structure) and content (=what you publish in the editor). This is one of the basic concepts of a CMS.


--- Quote ---I cannot fully edit template.css file. I can edit only one section related to <div id="wrap"> in the index.php. The rest - background, images, anything at all does not change whatever I do to the template.css. There is another file in this (1024px) template - style.css - but is seems to me completely redundant old copy, as it's not referenced in index.php file.

--- End quote ---
Sometimes designers use 2 stylesheets: 1 for structure (div, span, etc) and 1 for style (colors, images, etc). But they should both be called in the index.php. Try to download the template again, and start new. Maybe you accidentally deleted the styles.css call in your copy? Otherwise the templates is not correct, and you should add tha call yourself.


--- Quote ---Note: I am not sure what Argos means by "There is no separate HTML/CSS for each page." I can change the style (not the template structure) for each page separately through the page settings (for example I chose 'All CSS' for one page).

--- End quote ---
No, that is not right. You can change the template per page that way indeed. A template normally changes the complete layout of your site, or page. Your current template seems to be faulty. What I meant is that WB works with templates in whci you put content through the editor. It does not use a bunch of solitary HTML/CSS pages.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version