Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Reduce website menu work

  • 21-10-2011 3:55pm
    #1
    Registered Users, Registered Users 2 Posts: 934 ✭✭✭


    I've got a website developed but for every page I have the same code for the menu system. This works fine, but if I add a single extra page, or change a single link, I have to edit the menu system on EVERY page.

    :o

    Anybody know of an easier solution? I don't really want to use a frame for the menu!


Comments

  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    I've got a website developed but for every page I have the same code for the menu system. This works fine, but if I add a single extra page, or change a single link, I have to edit the menu system on EVERY page.

    :o

    Anybody know of an easier solution? I don't really want to use a frame for the menu!

    Use server side includes


  • Closed Accounts Posts: 5,857 ✭✭✭professore




  • Registered Users, Registered Users 2 Posts: 100 ✭✭VMotion


    OneOfThem Stumbled, it depends.
    What is the technology behind? Could you pm the link to take a look and be able to advise more to the point?


  • Registered Users, Registered Users 2 Posts: 1,530 ✭✭✭CptSternn


    What language is it written in? If it is in ASP.Net or Classic ASP you can as said above use server side includes or the normal include statement. If you are any good at Flash you can use it to create a single menu which displays on all pages. It all really depends on which language you are coding the site in and what technologies you are familiar with as it can be done dozens of ways.


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    CptSternn wrote: »
    If you are any good at Flash you can use it to create a single menu which displays on all pages.

    Good grief, not Flash.

    If your host allows SSI, that's the most straightforward solution for regular html code. Otherwise, the next stop would be something like PHP (for Windows or Apache servers) or ASP (for Windows only) includes methods. If you're already using PHP or ASP for your site, you might as well just use what you are already using for the includes.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 934 ✭✭✭OneOfThem Stumbled


    tricky D wrote: »
    Good grief, not Flash.

    Flash wont display on most smart phones, will it?

    Incidentally that brings me to a minor consideration concerning website intro-screens/movies which seem to be exclusively flash based: can these be just skipped by smart phones?

    As for what the host allows: it doesn't allow server-side processing. :eek:

    This is such a downside that I may end up moving the site lock-stock and barrel (excluding the index page) to a new host. :D


  • Moderators, Technology & Internet Moderators Posts: 11,017 Mod ✭✭✭✭yoyo


    Flash wont display on most smart phones, will it?

    Incidentally that brings me to a minor consideration concerning website intro-screens/movies which seem to be exclusively flash based: can these be just skipped by smart phones?

    As for what the host allows: it doesn't allow server-side processing. :eek:

    This is such a downside that I may end up moving the site lock-stock and barrel (excluding the index page) to a new host. :D

    Thats why you don't use Flash ;) Or if you do have an alternative "If this content doesn't display click here!" you can do this in JavaScript checking aswell I think, but its easiest just to avoid Flash, Can do most cool stuff nowadays with HTML/CSS and introduce JQuery or whatever to spruce effects up.
    For including the menu if its a static HTML site all you need to do is change all pages from *.htm/*.html to *.php . Then in your menu container have a:
    <?php require('menu.txt'); ?>
    
    and obviously in the menu.txt you put in the HTML code for the menu, you can do the same for footer too, to make it easier to change the copyright date or whatever.
    Make sure your web server supports PHP or else this wont work, most do, even IIS ones, look in the control panel, it may be turned off

    Nick


  • Registered Users, Registered Users 2 Posts: 10,906 ✭✭✭✭28064212


    You could create it in an external Javascript file and include it on all the pages.

    HTML:
    [HTML]...
    <script type="text/javascript" src="menu.js" />
    </head>
    <body onload="insertmenu()">
    <div id="menu"></div>
    ...[/HTML]
    menu.js:
    function insertmenu()
    {
       document.getElementById('menu').innerHTML = "[Insert Menu HTML here]";
    }
    

    It mightn't be the easiest to maintain (things like escaping quotes the whole time would become a pain). Still a better option than Flash though, if you don't have any server-side options

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Registered Users, Registered Users 2 Posts: 78 ✭✭caddy2


    dont know if this info is of any use to you, but we recently bought some software in easons to put a website together, it only cost €13, we havent a clue about code, html etc but we thought we would give it a try and if it didnt work out we contemplated getting someone to do one for us. But we are happy with the website we have published and is far better than the website we paid €800 to get put up before that - to which we did not have complete control of. But the Serif software we got in easons is quiet good and we often make changes as we like. website templates come as part of the package and it is pretty basic to work it. 'Serif web design studio' is the one we got


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    28064212 wrote: »
    You could create it in an external Javascript file and include it on all the pages.
    8<
    It mightn't be the easiest to maintain (things like escaping quotes the whole time would become a pain). Still a better option than Flash though, if you don't have any server-side options

    Externalising into a .js include file has issues with SEO indexing and JavaScript being turned off.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 10,906 ✭✭✭✭28064212


    tricky D wrote: »
    Externalising into a .js include file has issues with SEO indexing and JavaScript being turned off.
    True, but so does Flash. Also, some of the smarter bots do execute the javascript. Do a Google search for "javascript googlebot". Also the % of people with Javascript disabled would be tiny (IMO), you'd be better off catering for IE6 than Javascript

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    Which is why I said 'Good grief not Flash' earlier.;)

    On JavaScript not being turned off, more people are using stuff like NoScript add-ons for js blocking and also quite a few screen readers don't use it, if you are into accessibility matters (I am). Even a handful of percent is a significant portion of users.

    Lastly while Google have been reading it for a while now, they are a good bit less than 100% of the SEO market.


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    As for what the host allows: it doesn't allow server-side processing. :eek:

    This is such a downside that I may end up moving the site lock-stock and barrel (excluding the index page) to a new host. :D

    Wow, drop them now before your site becomes too integrated with their server settings to move easily.

    Keeping the index page on their server and moving the rest of the site makes no sense.


Advertisement