Embedding MediaWiki pages into main website - html

I'm looking for a way to get media wiki articles/pages into my main website. Our "documentation" is all on a separate website using MediaWiki, we want to embed the pages into our current website's template so it looks like it's apart of our website, as much as possible.
This means not having the navigation, headers & footers, etc. that normally come with a MediaWiki website. As well as possibly skinning it to look like the main site.
It might be worth mentioning the main website is running on Node.js

You could setup a template on your main site. Within the content area of this template you can use the jQuery load function to load the content part (#mw-content-text) of the MediaWiki page.
The code would look like this:
<div id="some-id"></div>
<script>
$('#some-id').load('URL-to-your-MediaWiki-page #mw-content-text');
</script>

Related

Creating a plain html home page AMP with WordPress running the other pages

Gday
I like to know how you would go about creating a home page in plain html and have WordPress run the other pages?
The reason is I’d like to create a solely plain html website but I need WordPress for my contact page it has a large form on it and I use a plugin to generate it and forms are a bit beyond my knowledge at the moment to create a contact page myself.
(I have tried creating a template page but then WordPress adds unnecessary code [from plugins ] and makes the AMP invalid)
Honestly I'd try and keep it self contained in WordPress itself.
If for some reason you really want a separate HTML/PHP Homepage, follow these steps:
Add a my-homepage.php file to your /wp-content/themes/ACTIVE-THEME directory
Inside that file put the following code:
Add a new page (Pages > Add New)
Give it a recognizable name like "My Homepage"
In the "Template" selector on the right hand side, pick "My HTML Homepage" and click Publish
Go to Settings > Reading, change Your homepage displays to A static page and pick the page you just made
Now you can add your own code as you see fit. Nothing "WordPress" related will get loaded or hooked in since there's no functions on that file - so you're free to code HTML (or PHP) to your heart's content.
You can see a bit more indepth answer over on WPSE: https://wordpress.stackexchange.com/questions/296592/how-to-use-custom-html-file-instead-of-wordpress-homepage

asp.net MVC: different scripts in pages

I have pretty simple landing site (index, faq, about, contact) based on ASP.net MVC. Of course, I use Layout (with head and footer), every View contains just page content. The problem: some pages has unique footer or head.
For example:
Index page has carousel (only this page, other pages has no carousel).
In source HTML (that web-designer sent me) I see scripts links in the head and scripts block in the end. Yes, I know: I can use Razor tag "#section" and declare this non-standard head and footer inside my view.
But! It means my view (page content) includes razor syntax. This is not pure HTML. What if site admin will want to edit index page - he will see Razor tags, he can't use some html editor or online tool (TinyMCE) for edit. He must know Razor. He can't just insert pure html.
Maybe I shouldn't keep page contents in DB? (but this site must support multi-lang). What is the best approac in this case?
Thanks.

Creating static HTML pages without repeating HTML across files

I'm building a simple personal static webpage. It'll be 4-5 pages (maybe more later) that all share a nav bar and header design at the top of the page.
I don't want to repeat the HTML and CSS for the navbar/header at the top of every page - ideally I'd like it all in one place.
If I were creating this using a web framework like Django, Sinatra, Rails, etc... I could use templates and partials to build the page using shared components like the navbar/header.
But I'm trying to keep things as simple as possible since it's a small set of static pages.
Is there a way to keep all the HTML in one file and reference it from the other files?
If not, is there a simple tool that will let me leverage the functionality that partials and templates provide, and just "compile" the final product into a series of HTML pages?
Thanks!
Use a one main Html file with all navigation bars, footer, menu and etc.
Keep a blank place, for example a blank div in the main page.
Keep other html pages in a separate place.
Load the contents dynamically to the blank div in the main page using javascripts.

Pull portion of web page from a page hosted on another server

I'm working on a company site that's hosted on a separate server from the main site. So, for example, I'm working on guest.company.com, and the main company website is www.company.com, and the two sites are hosted on different servers (and different development solutions).
The project I'm working on has a copy of the css from the main site, and has a shared layout with html copied from the main site. This shared layout is used for the top and bottom (header and footer) of the site I'm working on. However, I don't want to use a copy of that layout and html -- I want to actually pull in the layout & css from www.company.com so that when a change is made to that content on www.company.com, it's reflected on guest.company.com.
So, for example, the bottom "footer" area of www.company.com is contained in a footer html tag, and I want to display that content on guest.company.com.
How can this be done in MVC4 EF?
There is no quick fool-proof way to do this.
The quick way to get the HTML is making a webrequest call from your code and get the html and take what you need from it (i.e. header and footer). Have a look at this msdn link for an example of how to perform this. With that, you don't need "the other side" to do anything.
Having said that, it's potentially more complicated than that. As mentioned in the comments, css path should be made absolute. But there could be images (both within html and css). Also, if header and footer run any javascript, they need to be included in the page as well. You could of course include every single JS file that is referenced in the www.company.com page but there are sometimes JS run on the page. Your webrequest call wouldn't run the JS. In order to make sure all the javascript is run and the FINAL HTML is produced, you can use PhantomJS.
As you have probably noted, it could turn into a lot of work depending on what's on the header/footer. In my experience, a potential solution would be to have an FTP location that www.company.com copies the header/footer and their assets in. You can pull it from there every 24 hours or something.

Index page in Joomla

I have made a homepage in Joomla 2.5, and I need my front page to be different then the page made in Joomla.
My best solution then, is to make the front page in pure HMTL, and then redirect to the site made in Joomla. Is this possible? or is there an easier way to do it? for example with a plugin or something?
Create a custom html page and create it an article and then assign this article to front page. In this way you can display your custom html page to hope page of joomla.
Further if you want to remove even the headers and footers of the joomla page for home page this can be done in various ways
Make module positions and display the header and footer in it an
then in admin do not publish these modules for home page
We have
variable in template index.php which give us flags weather this is
home page you can use this flag and put a condition like if this is
home page dont display the header and footer.
Hope it will help you.
I can't really understand your question. If you want to load HTML only use custom HTML module rendered in your homepage
What are you trying to achieve? Without knowing more, I have two thoughts.
a. Joomla uses index.php. A lot of the time web servers look for index.html first. So if you create an index.html file and upload it to your root folder, it will display that first and not read your Joomla! site. If that doesn't work, check your web server to see the order that it looks for your start page. That is a setting that can be changed. (Depending on your hosting situation)
or b. You can set different templates for a single Joomla! site. you could set a different template for the homepage compared to the rest of the site. (I just need to know more on what you are trying to accomplish)
Have a great one.