how to add/insert html pages in my site without iframe ?

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Post Reply
sofian10
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Sat Dec 24, 2016 9:26 am

how to add/insert html pages in my site without iframe ?

Post by sofian10 » Tue Jan 08, 2019 6:17 am

hi
i have on my pc a complete html site .
it has index page and 2 folders that has many of pages .
the index page has just links that linking to pages in folder 1 .
the folder 1 has pages that has text , the text has links to pages in folder 2 .

i added them to a semple component and succes to review the index page on the site.
but links not open folder1's pages , i get error page on the browser that tell the request page not found .

steps of what i did :
Added my files (index page and 2 folders) in a folder called mybook .
Moved it (mybook) to this folder in a component :
component\views\default\tmpl\mybook .
edit this file :
component\views\default\tmpl\default.php
added this code :
<?php include mybook/index.html;?>
created a menu with this component , click on the menu wowww mybook is on my joomla site .

BUT : the links inside mybook index.html (that links to pages inside folders) open an error page .
The error is : The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated .

is there any help to make those urls works .

note :
i am not using iframe warber because :

opining any page inside the iframe not reset the position to top .
Explain :
When using joomla iframe , if scroll the iframe down and click on a link to open a new page , the iframe not go to the start top of the page , but stay on its place , this cause to scroll to top to see the start of the page (I hate this and my book has long pages ) .
and other reasons .... .

thanks

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 10629
Joined: Thu Feb 15, 2007 5:48 am
Location: Oxford, UK
Contact:

Re: how to add/insert html pages in my site without iframe ?

Post by toivo » Mon Jan 14, 2019 4:57 pm

sofian10 wrote:UT : the links inside mybook index.html (that links to pages inside folders) open an error page .
The error is : The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated .

is there any help to make those urls works .
The error occurs probably because Joomla and its routing mechanism know nothing about the folder and its HTML files. The views in Joomla component are defined as PHP files, not HTML pages.

If those HTML pages are never expected to change, add them as Joomla articles. The HTML and CSS code, including the links, need to be reviewed and adjusted, of course.

On the other hand, if the HTML pages are dynamic and get daily updates, it would be cost effective to develop a custom component to import the HTML code, modify the links and convert the HTML pages into Joomla articles automatically. This type of task is relatively straightforward to an experienced developer.

As you noticed, iframe wrappers are messy and therefore they are generally not recommended.
Toivo Talikka, Global Moderator
troubleshooting smtp and other articles https://talikka.com/joomla


Post Reply

Return to “General Questions/New to Joomla! 3.x”