The website I am (re)creating has multiple pages (15+) with the same menu on it. I know I can copy an existing base page and get the menu on each. However if I make a change in the menu later, I believe I will need to visit each page with a menu and paste the new menu code into the HTML element. The menu doesn't change that often and pasting the same code into several pages isn't overly difficult but I would prefer to simplify as much as possible.
In the previous incarnation, FrontPage allowed a "menu" to be defined and every page that used it incorporated it by reference. Change to the "menu" was immediately reflected on all pages. Simple and less error prone. I'm sure FrontPage played some tricks to make this happen.
I have a strong coding background but not in HTML/web. In the past, I have played with this a bit with no success.
<object style="width: 166px; height: 350px;" data="inc/file.html">
I copied this code from a vertical menu I once made, hence the dimensions. They can be changed, but I think you need some dimensions, but nowadays you probably will set them in % with a max-width.
Then you create the 'file.html' with the contents you need there. You have to include the styles and any scripts in that file, it won't take the styles and scripts from the main file, like php includes.
As I said, I have not actually tried this in RSD, but I can't see any reasons why it should not work.
In the Header box under Settings, put:
<?php include('includes/menu_head.html'); ?>
In the html element on the page, put:
<?php include('includes/menu_body.html'); ?>
Using a text or html editor create two files.
1. menu_head.html - put the code for the <head> in this file.
2. menu_body.html - put the code for the <body> in this file.
You now have two choices:
If you want to keep everything inside the RSD project:
In the RSD resources, create a folder called includes. Import the two files you just created into the includes folder. Now, anytime you make a menu change, simply change the menu_body.html file and replace the one in the RSD resources. Re-export RSD and upload that file.
If you want making changes to be even easier:
After you export the RSD project, create the includes folder and put the two files you created in the folder. Anytime you make a menu change, just change the menu_body.html file and upload.
Want personal and specialized help with RLM, RSD or with converting your VSD (or other) site to RLM/RSD? Email me at firstname.lastname@example.org or call 865-687-7698.
<object style="z-index: 999; max-width: 80%;" data="CM/church_menu_2016.html">
The menu shows up but it is not functioning correctly. It is there and does the flyouts but behind other objects and it adds scroll bars ineffectively. I included a z-index value and that seemed to have no effect.
You can see this at: http://jkinchnh.coffeecup.com/index.html
When directly embedding the menu header and body code it works great. The submenus fly out over the rest of the page and there are no scrollbars.
Still thinking about the server side include.
I wouldn't be at all surprised if Responsive Site Designer 2 proves to include the same facility.
It may be that the question has been overtaken by the above matters.
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
Also, has anyone found a way to import modified code/components into an RSD file?
Each time I export it, I end up having to put in my own code (and it gets old). It would be nice if code was modifiable before being exported, but that doesn't seem to be the case.
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.