Static HTML Page as Sharepoint page - html

I want to use my existing static HTML page as the sharepoint page(AS IS without any changes in look and feel). Is there a possibility and if so how....as I see from sharepoint to create pages it only shows me 2 options "Basic Page" and "Web Part Page" which both has a .aspx page. Can someone point me to the correct implementation.

Upload your html page in pages library and change your web application settings to permissive. That will do the trick.
-- Edit --
Go to Central Admin > Web Application management > choose your web application
Click on general settings and go to section that says Browser File Handling. By default it is set to Strict, make it Permission and save the change.
I hope this will help you correctly update the settings.

Related

Saving static HTML page generated with ReactJS

Background:
I need to allow users to create web pages for various products, with each page having a standard overall appearance. So basically, I will have a template, and based on the input data I need the HTML page to be generated for each product. The input data will be submitted via a web form, following which the data should be merged with the template to produce the output.
I initially considered using a pure templating approach such as Nunjucks, but moved to ReactJS as I have prior experience with the latter.
Problem:
Once I display the output page (by adding the user input to the template file with placeholders), I am getting the desired output page displayed in the browser. But how can I now obtain the HTML code for this specific page?
When I tried to view the source code of the page, I see the contents of 'public/index.html' stating:
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expectedly, the same happens when I try to save (Save As...) the html page via the browser. I understand why the above happens.
But I cannot find a solution to my requirement. Can anyone tell me how I can download/save the static source code for the output page displayed on the browser.
I have read possible solutions such as installing 'React/Redux Development Extension' etc... but these would not work as a solution for external users (who cannot be expected to install these extensions to use my tool). I need a way to do this on production environment.
p.s. Having read the "background" info of my task, do let me know if you can think of any better ways of approaching this.
Edit note:
My app is currently actually just a single page, that accepts user data via a form and displays the output (in a full screen dialog). I don't wish to have these output pages 'published' on the website, and these are simply to be saved/downloaded for internal use. So simply being able to get the "source code" for the dislayed view/page on the browser and saving this to a file would solve my problem. But I am not sure if there is a way to do this?
Its recommended that you use a well-known site generator such as Gatsby or Next for your static sites since "npx create-react-app my-app" is for single page apps.
(ref: https://reactjs.org/docs/create-a-new-react-app.html#recommended-toolchains)
If I'm understanding correctly, you need to generate a new page link for each user. Each of your users will have their own link (http/https) to share with their users.
For example, a scheduling tool will need each user to create their own "booking page", which is a generated link (could be on your domain --> www.yourdomain.com/bookinguser1).
You'll need user profiles to store each user's custom page, a database, and such. If you're not comfortable, I'll use something like an e-commerce tool that will do it for you.
You can turn on the debugger (f12) and go to "Elements"
Then right-click on the HTML tag and press edit as HTML
And then copy everything (ctrl + a)

how to enable base template on apphook'd page and use footer in static placeholder

I've got an application hook to work as explained in the very basic sample of the doc. The application does its job, renders its own templates and does all navigation back and forth.
But I am facing 2 problems:
After putting the hooked application an a page via the advanced settings of the cms, I am no longer be able to edit the page over the frontend. If I navigate in /?edit mode to this particular page cms toolbar dismisses and the /?edit mode is taken away.
How can I recover editing such an apphook'd page?
In the site's view mode (published apphook'd page) I have no styling and no base.html template stuff. So I miss the header menu coming from the base template and the footer which is generally added to each page by a static placeholder. Since I am not able to do frontend editing of the apphook'd page (as mentioned in paragraph 1), I am unable to embed the application into my well known page style.
How can I get the intimate styling back for such an apphook'd page?
I am working with
django 1.11.18
djangocms 3.5.3
python 3.7.2
Got it to go. Considerably following this instructions did the trick. I was able to overload the particular template from within the apphook application.

How to retrieve the HTML code of a particular site's homepage

I want to get the HTML code of a particular site. It asks me to register myself first so that I can be redirected to their home page. Now, my question is: is it possible to retrieve the HTML code of the desired page just by choosing option ‘View Page Source’ which appears on right click? Is there any other way to fetch the HTML code?
There are multiple ways of getting the HTML source code of a page
One way, as you already know is by viewing the page's source code.
If you Right Click -> View Page Source or just press Ctrl + U you will view the source code in your browser
If you are using linux, you can use wget to get the source code.
Just open up a console and type wget www.somewebsite.com and you will get the HTML source code along with any CSS and JS links.
However, you cannot get the PHP code using any method unless you have FTP access to the server
Yes it is possible to view HTML via 'View page source' or you could use PHP as mentioned in the comments.
'usign php yes php.net/manual/en/function.file-get-contents.php –
Vitorino fernandes'
You could also let a website and or program do it for you but it's trustability depends on the site and or program,
Do note it is NOT possible to view the PHP source since that is server-side.
Using any browser, the "View Page Source" option will show you the source of the page, as received by the browser (which may be different then the source currently displayed). You also have the option of using the File > Save Page As (or similar) menu option to save a copy of the html code of the page from the browser.
It is also possible to use command line tools like curl and wget to download the page to your local machine. Those tools provide options to send data (such as cookies or headers to identify yourself) along with the request.

How to Embed an Apex website on my HTML Website

I have an Apex application which I use for CMS of my website, I want to embed this on my website when a user logs in.
I have tried using an iframe however the APEX Application does not show in the iframe.
What is the correct way for embedding an APEX Application inside an HTML website?
In the APEX Application manager there is a setting to allow browser embedding this must be enabled in order to embed in an iframe. I had overlooked this setting when trying it.
As a new user of APEX it was not clear exactly where to find the setting mentioned by the OP. For APEX 5 I found the setting to enable iframes as follows:
Open APEX in your browser (for example, my URL is http://some-host:1337/ords)
Login to your workspace as an administrator
Click on Application Builder
Click the name of the application you want to enable to open it
On the title bar where your application name appears, click on Edit Application Properties (button to the right)
Toward the top, locate the link for Security and click it
Scroll down to the Browser Security section or click on the tab labeled Browser Security
Assuming it says Deny, change it to Allow or Allow from same origin
Press Apply Changes
Once this is complete you should be able to embed a URL for that specific APEX application in the src="[apex_url]" attribute of an iframe.
Note: Choosing Allow vs Allow from same origin depends on whether or not your application is running on the same host / root URL. In my case, the iframe was served from a different URL thus I chose Allow. Out of scope for this question but, for security reasons, you probably need to consider the implications of allowing this in your own environment.

Can we generate HTML report in Jenkins dashboard without redirecting to HTML page?

I want to customize my Jenkins report view with HTML report. I can publish HTML report using HTML Publisher plugin, but this is navigating to HTML page in full window. Instead of that, I want to generate the HTML report view inside the Jenkins dashboard where testing results or graph is displayed.
Can anyone suggest how to publish my HTML page inside Jenkins dashboard, like testing results and test trend graph which are embedded on Jenkins page? If any plugins available or else any modifications in configuration of Jenkins.
You can try HTML Publisher Plugin but there is also a useful plugin called DocLinks which allows you to publish your documents that are created in the build steps as links on the project page. Other ones are Doxygen and Cucumber.
If you have installed Dashboard view plugin,then:
1.Go to Edit view
2.Select "Iframe portlate" and add path of your html file.
3.Click apply.
See your dashboard.It shows HTML reports there
You can use The Rich Text Publisher Plugin which supports Atlassian Confluence, WikiText and HTML