Linked menu's

User 2120397 Photo


Registered User
99 posts

Hi!

RSP 2.0

I have a main menu on the left side in subgrid-column-1 with ID “mainmenu”. I use this on many of my webpages. Is there a way to link all these pages, so when I edit the main menu on the index page, all the others pages are updated as well?
Today I cut and paste to all the others pages using the same menu.

http//wilford.no
http://wilford.no
I may be a little grumpy in the morning, that is, before my first cup of coffee ;)
User 122279 Photo


Senior Advisor
14,651 posts

Yes, make a 'symbol' of the menu, insert it on all the pages, and when you update one instance of it, the other ones will be updated as well.

I'm not sure it will be recognised as a symbol on all pages if you already have created it on those pages. You will probably have to create it on one page, and then delete it from the other pages and re-add it.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2843676 Photo


Registered User
11 posts

Hi Wilford, I do this all the time with sites. My sites are all interactive so instead of pages being like index.html, it's index.php. PHP pages are nothing more than regular html pages that use .php extension rather than .html. Using php you can display any content from any php file anywhere on a page using what's called a 'php include statement'. It looks like this:
<?php
include ("left_menu.php"); ?> Or whatever you name your new 'menu.php' file. Just make sure path to file is correct
Wherever you place this code on your pages, the contents of 'left_menu.php' file you create and save to your root will display. To update your menu, simply edit your new left_menu.php file and save changes. Your menu will auto update across all pages.

In your RSD pages, the 'container' where your menu code is needs to be an 'HTML Element' to allow you to enter the php include code.
I believe there is also some code as of html5 that lets you do the same thing on a .html page however, I never use .html pages on any sites I build because most sites I build interact with a mysql data base. Wordpress is a prime example of this.

User 187934 Photo


Senior Advisor
20,271 posts

You can setup your server to parse php inside html pages.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2843676 Photo


Registered User
11 posts

I agree with Eric. As I hardly ever create site pages using the .html extension I forgot about this.
You need to be running on an apache server to do this. Simply add the following line to your Top Level .htaccess file:
# Use PHP56 as default
AddHandler application/x-httpd-php56 .php .html .htm

the php56 part relates to whatever version of php your server is running. Just run a phpinfo.php file to see which your using.
Once you have this set up you can utilize the php include statement in any .html or .htm file.
Here's a good link for more info.
http://stackoverflow.com/questions/4687 … -php-files
User 122279 Photo


Senior Advisor
14,651 posts

Wouldn't the 'symbols' be much easier, as it is already a build-in feature in RSD?
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2699991 Photo


Registered User
5,400 posts
Online Now

Inger wrote:
Wouldn't the 'symbols' be much easier, as it is already a build-in feature in RSD?


+1
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS


A simple quick way to contact me
https://rsd-tutorialscom.coffeecup.com/index.html
User 187934 Photo


Senior Advisor
20,271 posts

Wayan Jaya wrote:
Inger wrote:
Wouldn't the 'symbols' be much easier, as it is already a build-in feature in RSD?


+1

+1
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2120397 Photo


Registered User
99 posts

Inger wrote:
Yes, make a 'symbol' of the menu.


Hmm Symbol?
I don't follow you here.
Can’t find any references to use of symbols.
http://wilford.no
I may be a little grumpy in the morning, that is, before my first cup of coffee ;)
User 379556 Photo


Registered User
1,603 posts

There is some information about Symbols here.

Frank


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.