Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Need to have Unique images print in Detailed.html based on Main-Category

Quote Reply
Need to have Unique images print in Detailed.html based on Main-Category
I want to be able place a "main-category".gif in the detailed directory and I want to have each of the "main-category".gif(s) displayed in the associated #.html file that is generated in the detailed directory detailed.html template. How could I do this? I would guess that during the creation of the #.html page that I would have to capture the associated "main-category" and append it to ".gif" and/or somehow I might need a global (say... <%image1%> that can be used in the detailed template?

To possibly put it a graphical way: Say I have a main category "auto" and another "hobby". I want the associated detailed #.html with "auto" to contain the graphic "auto.gif". Likewise, I want the associated detailed #.html with "hobby" to contain the graphic "hobby.gif" in it's associated web page.

Keep in mind I am using the Resource Templates (that I have customized modules for my needs)... also the modules include th e IF-Include mod and all pages work fine at this point.

Anyone have any ideas on this.

Thanks- Tim Ryan

[This message has been edited by timryan (edited July 18, 1999).]
Quote Reply
Re: Need to have Unique images print in Detailed.html based on Main-Category In reply to
There are several ways to do that.

One is a variation of the multiple-templates mod, you can find here. You use 'if' statements to pick the appropriate template, or in your case, graphic.

If you do not have many levels of categories, you could use one graphic ie: category.gif and put the proper image in each subdirectory, and call it 'category.gif' and make the template call the image without any path. The static page will pull the image from the directory it's in, loading the correct image.

Quote Reply
Re: Need to have Unique images print in Detailed.html based on Main-Category In reply to
I do not think this will work as all the Detail pages are built in the one Directory currently (/Detailed/#.html).

I did find it quite easy to use unique graphics on the usually links/pages/categories just by placing each graphic in each unique category directory (as I believe you mention above). However, when using /Detailed pages I would need a way to make each detailed page #.html go into the unique subcategory when being built.

I am using the Resource Templates so maybe I am missing something here. Where is the mod you are refering to above? I will read up on it and see if this will be of use. I had originally planned on doing what you mentioned above (putting a same named gif in each category directory) This works with the index.html part of the builds but not for the Detailed part.

So it seems I need to figure a mod or code to make the Detailed #.html go into there appropriate category directory and not go all into the /Detailed directory as they seem to be designed to to now.

Hope this better explains the situation.
Thanks
Tim Ryan


[This message has been edited by TimRyan99 (edited July 19, 1999).]
Quote Reply
Re: Need to have Unique images print in Detailed.html based on Main-Category In reply to
I got ahead of myself --- yesterday, someone posted a mod to put the detailed pages in the subdirectgories, rather than all in one. It's a simple thing, change a couple of lines.

I guess I mixed the two posts.

Look for it -- it was posted yesterday.

Quote Reply
Re: Need to have Unique images print in Detailed.html based on Main-Category In reply to
Thanks Smile.. It is at:
http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002349.html

...and I will try it. If all goes well this should answer both problems/questions.
Thanks again all for your help.
Tim Ryan