rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: riccetts on June 16, 2011, 03:24:22 PM

Title: linking problem
Post by: riccetts on June 16, 2011, 03:24:22 PM
I would like to know how to link from page to page.(from to different templates)
I have both templates in a folder and hfs reconizes them. but when I click on the link
I get a download window instead.
can you help?
Thanks Riccetts
Title: Re: linking problem
Post by: rejetto on June 20, 2011, 02:18:12 PM
what's this link you click? what file is it?

Title: Re: linking problem
Post by: riccetts on June 21, 2011, 12:46:43 AM
The link I use is <a href="URL*****/hfs/Crimson.vfs">Home</a>
I get download window.
can you help?
Thanks
Title: Re: linking problem
Post by: rejetto on June 22, 2011, 07:12:16 AM
standard behavior of links is: if a folder, then enter, if a file, then download.
Some exceptions to this, like pictures that get shown, are managed by the browser.
I don't see a reason for the vfs file to act differently.
As a side note, the vfs is not a template. Those go by "tpl" extension. VFS is a virtual file system, that is a bunch of file (organized).

If you explain what you meant to do, i can suggest a way.
Title: Re: linking problem
Post by: riccetts on June 22, 2011, 07:48:22 PM
I made a sidebar menu and added a link to another template but it appears like its a download.
Is it possible to migrate to another template that I made with a link or do I have to add the template to the default tpl?
Title: Re: linking problem
Post by: raybob on June 22, 2011, 09:14:06 PM
The browser itself doesn't know what the template is, so rather than linking to it, you need to link to another folder that uses that template.  Try copying the second template to hfs.diff.tpl inside the new folder.
Title: Re: linking problem
Post by: riccetts on June 23, 2011, 01:12:01 AM
I tried it but it got me to an error 404 not found
do I have to put the complete address in diff and link?
Title: Re: linking problem
Post by: raybob on June 23, 2011, 02:59:11 PM
Put a new folder in your VFS, then click on properties, then go to the diff template tab.  Put your template there.

To get to it in the browser, just go to that folder with the alternate template.
Title: Re: linking problem
Post by: riccetts on June 23, 2011, 04:21:00 PM
I made a virtual folder called temp and the template is in the folder can you tell me how to set the link up. <a href="temp/hfs.diff.tpl">Browse</a> ?
At least thats what I have.
Title: Re: linking problem
Post by: raybob on June 23, 2011, 05:20:07 PM
No, you don't link to the template.  You link directly to the folder called /temp/ ex.  <a href="/temp/" >test</a>   and HFS will automatically deliver the new content based on the template inside that folder.  It's completely transparent to the browser; it doesn't know or care that it's a different template.
Title: Re: linking problem
Post by: riccetts on June 24, 2011, 12:54:19 AM
oh ok let me try it
thanks
Title: Re: linking problem
Post by: riccetts on July 05, 2011, 03:49:08 PM
I can't seem to get this to work.
I made another folder with the template in it and also included all images.
In diff I typed the template that I would like to go.
The link for this temp looks like this: <a href="/temp/">page 1</a>
I did the same for the other folder  the link for this:<a href="/temp2/">page 2</a>
It doesn't work I get in a different window the name of the template.
can you help?
Title: Re: linking problem
Post by: raybob on July 05, 2011, 04:04:47 PM
Make sure that /temp/ is a real folder, then in Windows Explorer, put a file named hfs.diff.tpl inside that folder, containing your template.  Alternatively, you can type in the file path in HFS itself in the diff template section, something like C:\temp\hfs.diff.tpl

Don't do both.
Title: Re: linking problem
Post by: riccetts on July 05, 2011, 06:48:59 PM
Don't do both?
In diff can i just type my template in?
now when I do this I get a new window and my templates name.
thats it.
Title: Re: linking problem
Post by: raybob on July 06, 2011, 05:33:53 PM
There are 3 different ways to make a diff template.

1)  Put a file called 'hfs.diff.tpl' in a folder.

2)  Type in the filepath of a template in the 'diff template' section of HFS.

3)  Type in your entire template into the 'diff template' section of HFS.

Title: Re: linking problem
Post by: rejetto on July 13, 2011, 12:51:48 PM
in cases like this, i guess the best way to go is the {.load tpl.} command
but i fear it's limited to "event scripts". Would this be true, you would have to put it inside the [request] event