Page 1 of 1

Modifying/designing own web templates

Posted: Thu Sep 08, 2005 11:42 am
by Guest
Hi

Firstly, I should confess that I am a bit of a beginner when it comes to html and css. Anyway I have some idea. So my question is:

How exactly do the templates work? I presume it's just a loop that loops over all the photos to go in to the page and replaces stuff like #FILENAME# with the actual filename. It appears though, from my experiementation, that if you change almost any of the markup on the thumb.html page the whole thing breaks.

Does anyone have a quick into to how to write your own template? Or what the key expressions that are replaced (if that's indeed how it works) are?

Thanks
Tim

Posted: Thu Sep 08, 2005 12:33 pm
by Drahken
I just tried toying with it (first time I've ever done anything with the webpage creation stuff in XN), and changed it around without any difficulty. I tend to think that your lack of experience with HTML/CSS is the main cause of the problems you're having. What exactly are you trying to do, and what exactly is the problem you run into?

Posted: Thu Sep 08, 2005 1:26 pm
by Guest
Sorted.

It was a bit sutble for me to realise at first. The thing was that I was editing the page.html document in a WYSIWYG editor (NVu) but this changes the markup to it own layout (ie changes indents etc). That's all well and good and doesn't effect the rendering at all. However it does effect things if you're using a "regexp" (as I assume xnview uses) to replace certain specific text structures there. So when I edit it in notepad things go fine.

Thanks for your quick offer of help anyway!
Tim

Posted: Thu Sep 08, 2005 5:39 pm
by helmut
Anonymous wrote:It was a bit sutble for me to realise at first. The thing was that I was editing the page.html document in a WYSIWYG editor (NVu) but this changes the markup to it own layout (ie changes indents etc). That's all well and good and doesn't effect the rendering at all. However it does effect things if you're using a "regexp" (as I assume xnview uses) to replace certain specific text structures there. So when I edit it in notepad things go fine.
As Drahken pointed out, the important bits in the HTML template are the #<identifier># tags. These are placeholders and commands which interpreted and replaced when generated the real HTML pages.
As long as you don't touch these special tags, your template should work, regardless whether you edit it in a simple Texteditor or in a WysiWyg tool.

Posted: Thu Sep 08, 2005 5:58 pm
by Drahken
The problem is that most WYSIWYG editors change all sorts of stuff, even things they shouldn't. WYSIWYG is good for beginners, but it's always best to edit HTML by hand (ie, using a text editor like notepad or wordpad).