Web Template Variables Confusing to Me

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

Moderators: helmut, XnTriq, xnview

Post Reply
smgerber
Posts: 4
Joined: Sun Apr 08, 2012 4:34 pm

Web Template Variables Confusing to Me

Post by smgerber »

I've been all over this forum and can't find an answer to a very basic question:

What tag do I use in a web template to use the filename WITHOUT the extension? #FILENAME# includes the extension and I don't want that because I'm using it for the caption of the picture.

Also,please, I can't find any explanation for "Information displayed" in the Web page Create dialogue. What does that dialogue actually provide. I press "insert" and see all these choices and yet nothing tells me their corresponding template variables, like <Filename With Ext>. I tried #FILENAME WITH EXT# #FILENAME_WITH_EXT#, and others and nothing works. I'm totally not understanding what "Information display" does.

I tried getting help by clicking "Info" "Help" and get a BAD TITLE error on this web site. I'm using version 1.97.1.

I'd appreciate any guidance. I really love the XNVIEW Web Page Creation feature. It's indispensable to me.

Thanks very much ... Sam
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Web Template Variables Confusing to Me

Post by xnview »

There is no variable to have filename without extension
And infos are used by #THUMBNAILS_LABEL#
Pierre.
smgerber
Posts: 4
Joined: Sun Apr 08, 2012 4:34 pm

Re: Web Template Variables Confusing to Me

Post by smgerber »

Pierre, can you further explain what you mean by:
"And infos are used by #THUMBNAILS_LABEL#"

I placed different fields in the display box under "Information displayed" and then used the variable #THUMBNAILS_LABEL# in the "thumb.html" file and nothing good happens. The only thing that appears in place of #THUMBNAILS_LABEL# is the word "Thumbnails".

This takes me back to my question of what function is provided by even having the "Information display" window?
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Web Template Variables Confusing to Me

Post by XnTriq »

  1. Go to Create » Web Page... » Information displayed.
  2. Make sure that the checkbox for Show information is ticked.
  3. Click on Insert >> and choose Filename to add <Filename> to the fileld.
In the HTML gallery generated by XnView, the filenames (without extension) should now appear where the #THUMB_TEXT# variable is in your template.

Example:
[color=green]\XnView\WebTemplate\Simple\thumb.html[/color] wrote:<td class="thumbs">
<a href="#FRAME_PAGE#"><img src="#THUMB_LINK#" width="#THUMB_WIDTH#" height="#THUMB_HEIGHT#" alt="#FILENAME#" title="#FILENAME#"></a><br>

#THUMB_TEXT#</td>
... will give you...
[color=green]\output\thumb.html[/color] wrote:<td class="thumbs">
<a href="original/test.html"><img src="thumb/t_test.jpg" width="128" height="128" alt="test.jpg" title="test.jpg"></a><br>

test</td>
smgerber
Posts: 4
Joined: Sun Apr 08, 2012 4:34 pm

Re: Web Template Variables Confusing to Me

Post by smgerber »

XnTriq, THANK YOU VERY MUCH!!!

Worked like a charm! The program author gave me an incorrect variable name, #THUMBNAILS_LABEL#. I wonder what he was thinking.

Am glad you were monitoring this thread!!! You've made me a happy camper.

Best ... Sam Gerber
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Web Template Variables Confusing to Me

Post by XnTriq »

Good to hear that it's working well for you, Sam 8)

The output for #THUMBNAILS_LABEL# etc. depends on the language settings in Tools » Options... » Interface.
  • #PREVIOUS_LABEL# ~ Previous / Précédent
    #THUMBNAILS_LABEL# ~ Thumbnails / Vignettes
    #NEXT_LABEL# ~ Next / Suivant
Template:
[color=green]\XnView\WebTemplate\Simple\page.html[/color] wrote:<td class="navi">
<a href="#PREV_PAGE#">#PREVIOUS_LABEL#</a> | <a href="#THUMB_PAGE#">
#THUMBNAILS_LABEL#</a> | <a href="#NEXT_PAGE#">#NEXT_LABEL#</a>
</td>
Output:
[color=green]\output\original\test_2.html[/color] wrote:<td class="navi">
<a href="test_1.html">Previous</a> | <a href="../thumb.html">
Thumbnails</a> | <a href="test_3.html">Next</a>
</td>
smgerber
Posts: 4
Joined: Sun Apr 08, 2012 4:34 pm

Re: Web Template Variables Confusing to Me

Post by smgerber »

I get it. Glad it's used somewhere. Don't need it but still good to understand it.

Thanks, XnTriq
Post Reply