Modifying/designing own web templates

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
Guest

Modifying/designing own web templates

Post 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
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post 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?
Guest

Post 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
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post 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.
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post 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).
Post Reply