Forums

This topic is locked

Rollovers in templates

Posted 09 May 2004 13:22:03
1
has voted
09 May 2004 13:22:03 phil bury posted:
I'm using tables in MX and created rollover links in a nested table. These worked fine in preview but when saved as a template stopped functioning.

Is there a method of using rollovers in a template or do i have to create the rollovers in the template.

Or is it best to do rollover links via the navigation bar option and would this work properly as a template.

Replies

Replied 11 May 2004 04:18:46
11 May 2004 04:18:46 Dave Thomas replied:
I tried to use templates a few times, but as i got more and more into my design and coding, templates seemed very inadequate.

do you need to use a template? what i do in that case is construct a page with all the elements in it apart from the content text and save it as empty.html or empty.asp whatever, and use that as a psuedo-template.
In other words, fill empty.html in with your content and choose "save as" and rename it to a different file.
This is a little benefit for keeping your design although it takes away the benfit of updating many pages at once etc..
Though i use server side includes for my pages so this isnt an issue.

god i babbled on there didn't i <img src=../images/dmxzone/forum/icon_smile_cool.gif border=0 align=middle>

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 11 May 2004 11:08:46
11 May 2004 11:08:46 Vince Baker replied:
I went through the same thought process as you Dave, I tried templates but got fed up with the limitations...

All my sites now use server side includes so I can update all pages at once. Works better than templates anyway i think.

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 13 May 2004 01:16:26
13 May 2004 01:16:26 phil bury replied:
Thanx to UltraDav & bakerv for their replies. I think I will drop the templates and use a Saved design as a template per your suggestions. I see that you both are using server side includes, as yet I am not familiar with this so if you can point me in the right direction I would be greatly appreciated.
Thanks again for your suggestion.
Replied 13 May 2004 14:19:03
13 May 2004 14:19:03 Dave Thomas replied:
Well Phil,

take this site im building at the moment as an example, as it has 90% server side includes.

test.webworldfx.net

basically everything you see other than the white content panel is a server side include. what that means is i have a seperate .asp file for my menu, my header, my top buttons etc... an individual file for each particular include.

this makes life so much easier for not only developing a template based site, but also for updating multiple pages at once <b>without</b> using an actual template .dwt file.

so for example the logo part would be: the part in blue is the include code. taking into consideration you saved the files in a folder called 'includes'
<pre id=code><font face=courier size=2 id=code>
<font color=red>
&lt;div id="logoBanner"&gt;<font color=blue>&lt;!-- #include file="includes/logo.asp" --&gt;</font id=blue>&lt;/div&gt;
</font id=red>
</font id=code></pre id=code>

and where you normally see:
<pre id=code><font face=courier size=2 id=code>
<font color=red>
&lt;img src="../myImg/logos/mainLogo.jpg" title="Welcome...." alt="welcome..." height="150px" width="750px"&gt;
</font id=red>
</font id=code></pre id=code>

well now that code sits in the file <b>header.asp</b>, and all you have to do to show the logo on any page is include the blue text in the div or table.

now take that into account for say a 20 row menu, if you had to manually adjust code in that menu, it would take forever, but if it was in an include file, one change updates <b>everything</b>.

so putting it all together, first i design the layout of the page, think where things are going to fit etc.., then i design the blank layout, then i create a page normally with <b>all</b> code in that one page, see what would be better as an include file, it's usually anything you want displaying on more than one page.
go ahead and create the blank .asp pages making sure to strip all code in code view so the new pages are absolutely blank, and cut the code you want in the include from the main page you built, save it, do the rest with all the other bits you want to do, then go back into your main page and where you had the info, replace it with include links, to the particular files.

So basically your header.asp page will only have the html code in it for the img, not the head or the body tag or any of the code which is there by default, get rid of all that, as it is already coded in your main page, and if you leave it in, youll get 2 head tags, 2 body tags etc.. and things will get messy.

hope i explained that clearly enough.


Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com

Edited by - UltraDav on 13 May 2004 14:22:33

Reply to this topic