Nav link does not redirect to...

User 2265269 Photo


Registered User
43 posts

To fix a problem that I have with the photo gallery program 'Coppermine' I have installed it on another site that I own.
In the index page for the site that is on the sub-domain on the other site I have put a navigation link to the other site.
If I click on this link it reports page not found. this is because the code adds the sub-domain proceeding the link I have set in the index.html on the sub-domain. This is the link it shows in the browser:
https://coppermine.1066cards4u.co.uk/ww … lying.club

In the html code for the page where the navigation link is on the sub-domain is shown below:
<div class="navigation container-grid"><center><a class="link-button btn nav-link" href="https://www.1066cards4u.co.uk/SMAIN/coppermine">GALLERY</a><a class="link-button btn nav-link" href="www.1066modelflying.club">HOME</a></center></div>

Rocky48
User 122279 Photo


Senior Advisor
14,447 posts

To make a page from another site appear in an iframe, do like this:

Create a page and call it something appropriate.
In a HTML element write this code: <iframe src="https://www.domain.com/page.html" title="Whatever you find fitting"></iframe>
You need to style the iframe by giving it size, possible borders, margins, padding etc. Write this styling as CSS in the same HTML element.
Then make a link to the page where you have the iframe, not to the page which is to be shown in the iframe.
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 379556 Photo


Registered User
1,533 posts

I'm not sure that I understand the exact situation, but it does seem to me that the last bit of the code quoted should be changed to include the https:// i.e.

<a class="link-button btn nav-link" href="https://www.1066modelflying.club">HOME</a></center>

rather than
<a class="link-button btn nav-link" href="www.1066modelflying.club">HOME</a></center>


Frank
User 2265269 Photo


Registered User
43 posts

Inger
I have tried your suggestion, but I can't get it to work. This is how I wrote it
<div class="navigation container-grid"><center><a class="link-button btn nav-link" href="https://www.1066cards4u.co.uk/SMAIN/coppermine">GALLERY</a>
<a class="link-button btn nav-link" <iframe spc ="https://www.1066modelflying.club.index.html">HOME</a></center></iframe></div>

It does nothing when I click the Home button!
The following is what Site designer compiles when I put https://www.1066modelflying.club as the target
<div class="navigation container-grid"><a class="link-button btn nav-link" href="https://www.1066cards4u.co.uk/SMAIN/coppermine">gallery</a><a class="link-button btn nav-link" href="https://www.1066modelflying.club" title="Home">HOME</a></div>


I get a 403 error:
Forbidden
You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Looks like it is trying to reach the page. Why would it not have permission to reach this page?
Would it be because the sub-domain is in a directory called SMAIN off .htaccess ?
Rocky48
User 2699991 Photo


Registered User
4,782 posts
Online Now

spc

Should be

src
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
Contact Me For One To One Assistance
https://alphathemes.coffeecup.com/forms … an%281%29/
User 122279 Photo


Senior Advisor
14,447 posts

Rocky, You didn't do what I told you.

Firstly, you need to correct the typo that Wayan alerted you to.
Secondly, (which I didn't actually tell you, but... ) you need to open and close tags in the correct sequence. If you have something that is within three tags, and the opening tags are in the sequence <div><a> <center>, then the closing sequence has to be the same, but reversed: </center> </a> </div>
Thirdly, I told you to make a page, let's call it 'about.html', and on that page you put the iframe tag in a HTML element. Then, in the navigation you link to the about.html, and when that link is clicked on, the page will open WITH the iframe. Don't mention the iframe in the navigation button.
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 122279 Photo


Senior Advisor
14,447 posts

Another way of doing this would be to skip the iframe completely. It has become quite difficult (because of security) to open a page from another site when it is embedded in an iframe, it has to be opened in a new window. And just using 'target="_blank" for that doesn't work.

Since you need to have the page you thought of opening in a new window anyway, why not just make a normal link to that page, plus select 'Target Blank' on the Element pane in SD? Much easier.
Ha en riktig god dag!
Inger, Norway

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



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.