SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP Template help needed

    I am trying to update a website that uses ASP to connect to a database.

    I want to change a template file i have so that it is CSS driven with as few tables as possible.

    I have managed to strip the tables from the header and footer sections of the template and replace them with divs and CSS styled unordered lists.

    I am struggling with the site breadcrumb, navigation and main content areas as these use ASP code to draw data from a database (i dont have access to the database). The site is updated using a Content Management System.

    The main site webmaster has told me that a CSS driven template is unworkable. I think that she just cannot be bothered to change with the times and therefore won't move to a CSS driven layout. She took great lengths explaining that she had been doing the job for six years and that tables were the best way to go.

    I have the template file i'm trying to change. I have included the full template unchanged below. The template code is below:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title><%=Server.HTMLEncode(toPage.title)%></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <link href="test.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    @media print{
    body{ background-color:#FFFFFF; background-image:none; color:#000000 }
    #header{ display:none;}
    #parentlinks{ display:none;}
    #navigation{ display:none;}
    #banner{ width:100%;}
    #contentarea{ width:100%;}
    #footer{ display:none;}
    }
    </style>

    <meta name="Title" content="<%=Server.HTMLEncode(toPage.navTitle)%>" lang="en-GB" xml:lang="en-GB">
    <meta name="Subject" content="Site Content" lang="en-GB" xml:lang="en-GB">
    <meta name="Keywords" content="Official, Site Keyword, Another Site Keyword"><%=Server.HTMLEncode(toPage.meta_keywords)%>"

    lang="en-GB" xml:lang="en-GB">
    <meta name="Description" content="My Website<%=Server.HTMLEncode(toPage.meta_description)%>" lang="en-GB" xml:lang="en-GB">
    <meta name="Publisher" content="Site Publishers Name and Contact Details" lang="en-GB" xml:lang="en-GB">
    <meta name="Contributor" content="<%=toPageHTML.editor().fullName%>" lang="en-GB" xml:lang="en-GB">
    <meta name="Author" content="webmaster" lang="en-GB" xml:lang="en-GB">
    <meta name="Telephone" content="<%=Server.HTMLEncode(toPageHTML.editor().telephone)%>" lang="en-GB" xml:lang="en-GB">
    <meta name="Email" content="<%=Server.HTMLEncode(toPageHTML.editor().email)%>" lang="en-GB" xml:lang="en-GB">
    <meta name="Date" content="<%=toPageHTML.modified.shortFormat()%>" lang="en-GB" xml:lang="en-GB">
    <meta name="Type" content="" lang="en-GB" xml:lang="en-GB">
    <meta name="Format" content="text/html" lang="en-GB" xml:lang="en-GB">
    <meta name="Identifier" content="" lang="en-GB" xml:lang="en-GB">
    <meta name="Source" content="" lang="en-GB" xml:lang="en-GB">
    <meta name="Language" content="English, Great Britain" lang="en-GB" xml:lang="en-GB">
    <meta name="Relation" content="" lang="en-GB" xml:lang="en-GB">
    <meta name="Coverage" content="" lang="en-GB" xml:lang="en-GB">
    <meta name="Rights" content="Site Copyright Notice" lang="en-GB" xml:lang="en-GB">
    <meta name="template" content="test.jtm - 28 May 05" />

    <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
    </head>

    <body bgcolor="#FFFFFF">
    <a name="top" id="top">
    <!-- top -->
    </a>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td><table id="header" border="0" cellpadding="0" cellspacing="4">
    <tr>
    <td valign="top" rowspan="2"><a href="/index.htm"><img src="/img/mysite/templates/picture.jpg" alt="Back to the home

    page" width="140" height="60" border="0"></a></td>
    <td valign="top"><table id="banner" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><a href="/mysite/index.htm"><img name="banner_re" src="/img/mysite/templates/banner.jpg" width="480"

    height="45" border="0" id="banner" alt="Back to the home page"></a></td>
    </tr>
    </table>
    </td>
    <td valign="top"><a href="/mysite/careers/index.htm"><img name="jobs" src="/img/mysite/templates/jobs.jpg"

    width="120" height="45" border="0" id="jobs" alt="Visit mysite Careers pages"></a></td>
    </tr>
    <tr>
    <td class="crumbs" colspan="2"><a href="/mysite/careers/index.htm">Careers</a> - <a

    href="/mysite/org/index.htm">Organisation</a> - <a href="/mysite/jobhunt/index.htm">Job Hunt</a> - <a

    href="/mysite/magazine/index.htm">Magazine</a> - <a href="/mysite/news/index.htm">News</a> - <a

    href="/mysite/shop/index.htm">Shop</a> - <a href="/mysite/sport/index.htm">Sport</a> </td>
    </tr>
    <tr>
    <td colspan="3" bgcolor="#cc0000"><img height="2" src="/img/mysite/global/spacer.gif" alt=" "

    width="760"></td>
    </tr>
    <tr>
    <td colspan="3">
    <!-- BREADCRUMB START -->

    <%
    var strParentLinks = "";
    var oTmpPage = toPage;
    while(oTmpPage.id != 1){
    if(oTmpPage.navTitle != "index"){
    strParentLinks = '/&nbsp;<a href="' + oTmpPage.directLinkTo() + '" class=directoryLink>' + oTmpPage.navTitle +

    "</a>&nbsp;" + strParentLinks;
    }
    oTmpPage = oTmpPage.parent();
    }
    strParentLinks = '<a href="' + oTmpPage.directLinkTo() + '" class=directoryLink>' + oTmpPage.title + "</a>&nbsp;" +

    strParentLinks;

    writeHTML(strParentLinks);
    %>

    <!-- BREADCRUMB END -->
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0">
    <tr valign="top">
    <td width="150" bgcolor="eeeeee" class="lhnav" id="navigation"><table border="0" cellpadding="0" cellspacing="4">
    <tr>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <!-- HOME PAGE LINK -->
    <td><table width="100%" border="0" cellspacing="4" cellpadding="0">
    <tr>
    <td><div align="center"></div></td>
    </tr>
    </table></td>
    </tr>
    <!-- HOME PAGE LINK END -->
    <tr>
    <td><div align="center"><em><%=Server.HTMLEncode(toPage.navTitle)%></em></div></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><img height="6" src="/img/mysite/global/spacer.gif" alt=" " width="150"></td>
    </tr>
    <tr>
    <td>
    <!-- LINKS START -->
    <%

    var arrBreadcrumb = new Array();
    var oTmpPage = toPage;

    while(oTmpPage.id != null){
    arrBreadcrumb[arrBreadcrumb.length] = oTmpPage;
    oTmpPage = oTmpPage.parent();
    }
    Page.prototype.isOnBreadcrumb = function(){
    for(var c=0; c<arrBreadcrumb.length; c++){
    if(arrBreadcrumb[c].id == this.id) return(true);
    }
    return(false);
    }


    Page.prototype.outputLink = function(tier){
    writeHTML(' - <a href="' + this.path + '" class="navTier' + tier + '">' + Server.HTMLEncode(this.navTitle) + '</a><br>');
    if(this.isOnBreadcrumb()){
    var arrChildren = this.childrenAllowedInNav();
    for(var c=0; c<arrChildren.length; c++){
    arrChildren[c].outputLink(tier + 1);
    }
    }
    }


    var oHomePage = new Page(toTemplateInfo.sectionHomePage.useValue);
    var arrTLNav = oHomePage.childrenAllowedInNav();
    for(var c=0; c<arrTLNav.length; c++){
    var oTLPage = arrTLNav[c];
    writeHTML('<a href="' + oTLPage.path + '" class="main_nav">' + Server.HTMLEncode(oTLPage.navTitle) + '</a><br>');

    if(oTLPage.isOnBreadcrumb()){
    var arrSubNav = oTLPage.childrenAllowedInNav();
    if(arrSubNav.length == 0){
    writeHTML(' ');
    }else{
    writeHTML('</td></tr>');
    writeHTML('<tr><td><img src="/img/mysite/global/spacer.gif" width="150" height="1" alt=" "></td></tr>');
    writeHTML('<tr><td>');

    for(var sc=0; sc<arrSubNav.length; sc++){
    var oSNPage = arrSubNav[sc];
    // writeHTML('<a href="' + oSNPage.path + '" class="navTier2">' + Server.HTMLEncode(oSNPage.navTitle) + '</a>');
    oSNPage.outputLink(2);
    }

    writeHTML('</td></tr>');
    writeHTML('<tr><td><img src="/img/mysite/global/spacer.gif" width="150" height="3" alt=" "></td></tr>');
    writeHTML('<tr><td>');
    }
    }
    }
    %>
    <!-- LINKS END -->
    </td>
    </tr>
    <tr>
    <td><img height="6" src="/img/mysite/global/spacer.gif" alt=" " width="150"></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>

    <form action="/cgi-bin/perlfect/search/search.pl" method="get" name="Search" id="Search">
    <table cellpadding="0" cellspacing="4" border="0" bgcolor="b3b3b3">
    <!-- SEARCH START -->
    <tr valign="TOP">
    <td>
    <input type="hidden" name="p" value="1">
    <input type="hidden" name="lang" value="en">
    <input type="hidden" name="mode" value="all">
    <label for="q"><strong>Search site<br>
    </strong></label>
    <label for="q"> </label>
    <input type="text" name="q" size="20" value="Search Term " style="font-size:12px;

    font-family:arial,helvetica; width:140; border:none;" accesskey="S"></label>
    </td>
    </tr>
    <tr valign="TOP">
    <td><input type="image" src="/img/mysite/templates/search_grey.gif" alt="Search" value="Search" width="140"

    height="19" name="image"></td>
    </tr>
    <!-- SEARCH END -->
    <!-- PRINT START -->
    <tr>
    <td> <a href="javascript:void(self.print())"><img src="/img/mysite/templates/print_grey.gif" width="90"

    height="19" alt="Print this page" border="0"></a> </td>
    </tr>
    <!-- PRINT END -->
    </table>
    </form>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td> &nbsp;&nbsp; </td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="4" id="maincontent">
    <tr>
    <td valign="top"><%=toPageHTML.HTML%></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

    <table id="footer" width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td><table border="0" cellpadding="0" cellspacing="4" class="eeeeee">
    <tr>
    <td class="footer" colspan="3" bgcolor="#003399"><img alt=" " src="/img/mysite/templates/spacer.gif" width="2"

    height="2"></td>
    </tr>
    <tr>
    <td class="footer">This page was last reviewed on: <%=toPageHTML.modified.shortFormat()%> </td>
    <td class="footer">&nbsp;</td>
    <td class="lastrev"><a href="#top">Back to TOP ^^</a></td>
    </tr>
    <tr>
    <td colspan="3" class="footer"><img height="2" src="/img/mysite/global/spacer.gif" alt=" " width="760"></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table border="0" cellpadding="0" cellspacing="4">
    <tr>
    <td class="footer"><img height="2" src="/img/mysite/global/spacer.gif" alt=" " width="760"></td>
    </tr>
    <tr>
    <td class="footer"><div align="center"> <a href="/mysite/index.htm"><br>
    Home Page</a> - <a href="/mysite/privacy.htm">Privacy
    Statement</a> - <a href="/mysite/termsofuse.htm">Terms of use</a> - <a href="/mysite/equal.htm">Equal
    Opportunities</a>

    <br>
    <a href="/mysite/contact/index.htm">Contact My Site</a> - <a href="/mysite/help/search/index.htm">Search
    My Website</a> <br>
    <br>
    &copy; Site Copyright 2004 - </div></td>
    </tr>
    </table></td>
    </tr>
    </table>

    </body></html><%=""%>

    As you can see from the template it is full of loads of nested tables.
    Any help with the template file will be appreciated as i want to prove to the webmaster that the template can be driven using CSS and Stylesheets, getting rid of all the tables from the template.
    Last edited by devilslayer; May 22, 2005 at 08:59.

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changes i have done to the header and footer

    Here is what i have done to alter the header of what i have posted.

    The tables have been removed and replace with divs #top, #header and #menu

    The menu is styled using CSS and an unordered list.
    <!-- top -->
    <div id="top">
    <div id="header">

    <a href="http://www.mysite.co.uk/index.htm">
    <img src="../../../img/mysite/templates/picture.jpg"
    alt="Home" border="0"></a>
    <a href="http://www.mysite.co.uk/mysite/index.htm">
    <img src="../../../img/mysite/templates/banner.jpg"
    alt="My Site" border="0"></a>
    <a href="http://www.mysite.co.uk/mysite/careers/index.htm">
    <img src="../../../img/mysite/templates/jobs.jpg" alt="Jobs" border="0"></a>

    <div id="menu">
    <ul>
    <li><a href="/mysite/careers/index.htm">Careers</a></li>
    <li><a href="/mysite/org/index.htm">Organisation</a></li>
    <li><a href="/mysite/workplacement/index.htm">Work Placement</a></li>
    <li><a href="/mysite/magazine/index.htm">Magazine</a></li>
    <li><a href="/mysite/news/index.htm">News</a></li>
    <li><a href="/mysite/shop/index.htm">Shop</a></li>
    <li><a href="/mysite/hobbies/index.htm">Hobbies</a></li>
    </ul>
    </div>
    </div>
    </div>

    The footer also has had the tables removed and place into divs styled with CSS and using unordered lists for the links.

    <div id="footer">
    <div class="lastrev">This page was last reviewed on: <%=toPageHTML.modified.shortFormat()%> </div>


    <div id="footerlinks">
    <ul>
    <li><a href="/mysite/index.htm">Home Page</a></li>
    <li><a href="/mysite/privacy.htm">Privacy Statement</a></li>
    <li><a href="/mysite/termsofuse.htm">Terms of use</a></li>
    <li><a href="/mysite/equal.htm">Equal Opportunities</a></li>
    <li><a href="/mysite/contact/index.htm">Contact My Site</a></li>
    <li><a href="/mysite/help/search/index.htm">Search My Website</a></li>
    </ul>

    <div id="copyright"> &copy; Site Copyright 2004 </div>
    </div>
    </div>
    Last edited by devilslayer; May 23, 2005 at 09:04.

  3. #3
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Thanks for your informative reply. NOT!

    Thank You for your informative reply?

    I'm sorry i didn't even realise i had posted this twice, thanks for pointing this out.

    I thought that sitepoint forums was a place where people helped each other. Obviously not with individuals just scouring posts looking for errors.

  5. #5
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So everything in orange you want to change to run off a CSS design?


  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DHTML God,

    Your correct. The orange part of the template is what i want to change.

    At present the HTML contains ASP code that writes <tr> and <td> tags and closes them.

    What i would like is for the LH navigation to be in its own div with a css styled unordered list for the the navigation links.

    I want to take the breadcrumb out of a table and place it into a div so that i can position it with CSS (i need it to still make a call to the database though using ASP code)

    And i'd like the the main content to be in a div.

    I can do all this on a static site, however i don't know what to change in the code to achieve it on this template.

    I have taken all the table tags out of the template and then uploaded it to the test site, but all i end up seeing is the header and footer. The menu, breadcrumb and main content area were just blank.

    I want to produce a fluid CSS layout by floating the 2 columns (lh navigation and main content areas) and using the clear attribute to position the footer beneath these two floated columns.

    Are all the &nbsp needed?

    I could style the menu on a static site by using and unordered list as such:

    Code:
    <ul>
         <li><a href="#">Vehicles</a>
             <ul>
                  <li><a href="#">Cars</a></li>
                  <li><a href="#">Motorcycles</a></li>
                  <li><a href="#">Buses</a></li>
             </ul>
         <li><a href="#">Toys</a>
             <ul>
                  <li><a href="#">Ball</a></li>
                  <li><a href="#">Bat</a></li>
             </ul>
    </ul>
    I could then use css rules in an external stylesheet to style the list.

    What do i need in the ASP code to enable the naviigation to automatically add the different levels of the navigation (for example, what if the navigation is 3 or 4 tiers deep?)

    The code that i want to change isn't the whole of the orange section because i have managed to strip the tables from the Search Form. and placed it in it's own div (then again that part didn't have any code i needed to change).

    The code i need to alter is just that that produces the

    breadcrumb
    lh navigation
    Main Content

    The external .css file contains these rules:

    .directorylink
    { font-size:70%; color : #CC0000; text-decoration : none; }

    .links_top
    { font-family : arial narrow, helvetica; color : #FFFFFF; text-decoration : none; font-weight : bold;}

    .main_nav {
    FONT-WEIGHT: bold;
    }

    .navTier1 {
    font-size:80%;
    font-weight: bold;
    }
    .navTier2 {
    font-size:80%;
    }
    .navTier3 {
    font-size:80%;
    text-align: center;
    text-decoration: none;
    width: 120px;
    padding: 0px 0px 0px 5px;
    }

    .navTier4 {
    font-size:80%;
    width: 120px;
    padding: 0px 0px 0px 10px;
    }
    .navTier5 {
    font-size:80%;
    text-align: center;
    width: 120px;
    padding: 0px 0px 0px 15px;
    }

    looking at the css i can see that each tier of the nav has 20% smaller text than the next level up and that each tier is moved to the right by increasing the padding on the left hand side by 5px.


    I know that this code is responsible for the navigation

    writeHTML(' - <a href="' + this.path + '" class="navTier' + tier + '">' + Server.HTMLEncode(this.navTitle) + '</a><br>');

    I just don't know how to alter the code to do what i need.

    I can see that the writeHTML code is writing <tr> aand <td> tags and closing them.

    How do i get the code to write <div> <ul> <li> etc. I wish i knew how to read ASP.

    I have even purchased the Sitepoint Book by Zak Ruvalcaba "Build your own ASP.NET Website Using C# & VB.NET" This book must use a totally different version on ASP as it has commands such as

    <script runat="server" language="VB">
    or
    <script runat="server" language="C#">

    Is the template i have posted using an old version of ASP?

    Thank You for your help.

  7. #7
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, this is written in ASP using JScript, which is older than ASP.NET. I've never written JScript, but I'll try and help you as much as I can! What we need is the source to the WriteHTML function. I've came across this before, it comes from an article on MSDN: http://msdn.microsoft.com/library/de...aspstrcatn.asp

    We should be able to edit that to output what your looking for... possibly...


  8. #8
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply and help. I will be responsible for updating my companies website in the future ( i am all self taught though). Learn't html and css by reading books by Eric Meyer, Dan Cederholm etc. Still very much a newbie though.

    However i have to use these templates.

    I want to alter the templates, as i feel using tables for presenting layout of a website is fundamentaly wrong and that the website layout can be achieved by using our CMS and code.

  9. #9
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the link to the microsoft site. I have read it and i'm still none the wiser.

    The only thing i have to work with is the template. Do i need something else?

  10. #10
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by devilslayer
    I thought that sitepoint forums was a place where people helped each other. Obviously not with individuals just scouring posts looking for errors.
    yes, this may be so for people like you who come here only asking for help & who don't seem like helping any one else!! but for guys like me, we feel that we should help the staff to keep sitepoint forums a clean & organised place. so instead of acknowledging your mistake(which can happen with anyone, no big deal) you are trying to get shirty with me!!! keep up that attitude & I'm sure the next time you come around asking for help, no one will feel like helping you!!
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  11. #11
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need access to the writeHTML code, this is where table tags are being generated for the bread trail

  12. #12
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Re message by asp_funda

    asp_funda

    If you read my previous reply you would have seen that i did apologise, as i didn't realise i had posted this twice.

    Quote Originally Posted by devilslayer

    I'm sorry i didn't even realise i had posted this twice, thanks for pointing this out.
    I realise that for everybodies sake that duplicate entries should be avoided. But accidents do sometimes happen (nobody is perfect).

    Maybe i would have been more receptive to your advice if you had attempted to answer my request for help, rather than just leaving a comment like "Don't post duplicates"

    I don't just come to a forum for help, if i read a message and can help i will.

    However seeing as i cannot code in ASP it would be pretty pointless me advising people how to do it, wouldn't it? I'm sure you'll agree?

    We all have to start somewhere, even you were a beginner at one time, and at that stage you were probably asking for more help than you were giving. Tell me i'm wrong!!

    Now if somebody asked me to help them install or troubleshoot a computer or set up a network or something i have been doing for years, i could possibly help them. I'm no expert at these either but i could possibly help the less experienced ie making crossover and patch cables etc.

    I am trying to expand my knowledge from basic computer maintenance to HTML, CSS and Server Side Scripting.

    I have taught myself basic XHTML/HTML and CSS by reading books (many of them from Sitepoint).

    Once i become more proficient i will answer posts and if i do see a simple post i know the answer too, of course i'd answer it.

    I asked for help, whether you feel like you should give it or not, is down to your character and character traits. I didn't specifically ask you for help and if you feel that you don't want to, don't!

    Beginners as well as experts need help, we cannot all start out as experts can we?

  13. #13
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    writeHTML code

    Quote Originally Posted by dhtmlgod
    You need access to the writeHTML code, this is where table tags are being generated for the bread trail
    The full code from the template was posted above, sorry i didn't know how to post it as code at the time.

    The section of code from above is quoted below

    Code:
    var oHomePage = new Page(toTemplateInfo.sectionHomePage.useValue);
    var arrTLNav = oHomePage.childrenAllowedInNav();
    for(var c=0; c<arrTLNav.length; c++){
    var oTLPage = arrTLNav[c];
    writeHTML('<a href="' + oTLPage.path + '" class="main_nav">' + Server.HTMLEncode(oTLPage.navTitle) + '</a><br>');
    
    if(oTLPage.isOnBreadcrumb()){
    var arrSubNav = oTLPage.childrenAllowedInNav();
    if(arrSubNav.length == 0){
    writeHTML(' ');
    }else{
    writeHTML('</td></tr>');
    writeHTML('<tr><td><img src="/img/mysite/global/spacer.gif" width="150" height="1" alt=" "></td></tr>');
    writeHTML('<tr><td>');
    
    for(var sc=0; sc<arrSubNav.length; sc++){
    var oSNPage = arrSubNav[sc];
    // writeHTML('<a href="' + oSNPage.path + '" class="navTier2">' + Server.HTMLEncode(oSNPage.navTitle) + '</a>');
    oSNPage.outputLink(2);
    }
    
    writeHTML('</td></tr>');
    writeHTML('<tr><td><img src="/img/mysite/global/spacer.gif" width="150" height="3" alt=" "></td></tr>');
    writeHTML('<tr><td>');
    Thank you once again.

  14. #14
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Quote Originally Posted by devilslayer
    If you read my previous reply you would have seen that i did apologise, as i didn't realise i had posted this twice.

    I realise that for everybodies sake that duplicate entries should be avoided. But accidents do sometimes happen (nobody is perfect).
    I just replied to that because of your retort!! If you had realised your mistake then you wouldn't have retorted that way, it wasn't right in any sense!!


    Quote Originally Posted by devilslayer
    Maybe i would have been more receptive to your advice if you had attempted to answer my request for help, rather than just leaving a comment like "Don't post duplicates"
    I or anyone else here is not under any bounds to help anyone. We do this because we like to share what we know with people who need that knowledge. But that doesn't mean that you can't be told off from doing anything not appropriate by someone who's not helping you!! what's this? a barter system?


    Quote Originally Posted by devilslayer
    I don't just come to a forum for help, if i read a message and can help i will.
    Oh, sorry about that remark!!


    Quote Originally Posted by devilslayer
    However seeing as i cannot code in ASP it would be pretty pointless me advising people how to do it, wouldn't it? I'm sure you'll agree?

    We all have to start somewhere, even you were a beginner at one time, and at that stage you were probably asking for more help than you were giving. Tell me i'm wrong!!
    No, you are correct!!


    Quote Originally Posted by devilslayer
    I have taught myself basic XHTML/HTML and CSS by reading books (many of them from Sitepoint).

    Once i become more proficient i will answer posts and if i do see a simple post i know the answer too, of course i'd answer it.
    That's how almost everyone starts, even I did like that, except I didn't have SitePoint books.


    Quote Originally Posted by devilslayer
    I asked for help, whether you feel like you should give it or not, is down to your character and character traits. I didn't specifically ask you for help and if you feel that you don't want to, don't!
    Are you implying that I don't feel like giving help? I don't need to answer that at all. My 'ASP Guru' award which I got for helping out in the ASP community here & my track record of 2 years here(you can get an estimate by checking my past posts) speaks that for me!! And I don't brag, so I won't say anymore!!

    I'd just say that you shouldn't be polite only with the guys who help you, you should be polite with everyone. If you are polite with others, the others will be polite with you!! You did something in-appropriate & I just brought it to your attention, you accepted it & its all good. There was no need to retort like you did.
    Quote Originally Posted by devilslayer
    I thought that sitepoint forums was a place where people helped each other. Obviously not with individuals just scouring posts looking for errors.
    that's you who said that, right?
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  15. #15
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Screenshot of existing template

    I have added a screen shot of the template i am trying to change.

    I have added some temp styles to show tables and table cells (as shown in Eric Meyer on CSS)

    /* temp styles */
    table {border: 2px solid red; margin: 2px}
    td {border: 1px dotted purple; padding: 1px;}
    /* end temp styles */

    This is the original template. I have removed the tables from the header and footer sections and moved the search box into the header on the RHS of the logos.

    Header = 3 Tables
    Footer = 3 Tables

    Therefore i have removed 6 tables from the template.


  16. #16
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As you can still see the centre section that contains all the ASP code and writeHTML calls still contains SIX tables.

    I cannot believe a template this basic would have 12 tables.

    The content for the main content area is submited using a CMS (This CMS cannot be changed). The content is given a heading to go in the main navigation and it automatically gets added once the page is uploaded.

    Likewise the breadcrumb gets written also, depending where on the site the page is.

    Example

    Homepage/business/type/

    If i add a page that i give a navigation name of networking. It would automatically get put into the breadcrumb.

    Homepage/business/type/networking

    I'm sure you all understand.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •