Sitecore - Export as HTML - html

I know about the Sitecore function to export Items to XML. But what I need is the complete HTML markup including permissions of the displayed pages in Sitecore.
Is there a way to export these out of Sitecore into XML?

I am not sure that I entirely understand the question. If you simply want to export the pages of a website the easiest solution is to use a web scraping tool (http://www.codeproject.com/Articles/1041115/Webscraping-with-Csharp).
However I am uncertain about what you mean by "including permissions". Do you mean the security permissions set on the context item (the item/page being displayed)? If so then please note that a page can be composed by a context item and a lot of embedded data source items used in the various renderings which makes it a bit more tricky.
Cheers, Bo

Related

Format list view and link to OOTB Preview functionality?

I have a document library and i have formatted the list view. This works great, however, we lose the OOTB functionality of SharePoint online where you can "preview" the file. This is where it opens in the main window and you can see the file but you also have all the SPO functionality, Share, Move, Copy, information window, version history etc.
How do i edit my Json to link to the OOTB preview? Does anyone have examples of this?
I was looking at it, but it seems that it is not possible to get items url nor parent folder's url using column formatting. I have found somehting at GitHub that mentioned .spItemUrl, but I wasn't able to use it.
The only way, is to create Field Customizer using Javascript, which will give you much broader options. Unfortunately it is not that easy to build as creating column formatting using JSON.
Reference:
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer

How can I serve an existing html file through a View in asp.net core mvc?

I've a set of pre-generated html documentation files (provided via an external mechanism). These are fully standalone in their own right, but I'd like to integrate these files into an existing portal.
Ideally, I'd like the existing site to take care of the (common) layout, and simply embed the existing html into this layout. I've been trying to get it to work over the last few hours to no avail.
Problems I've encountered (no specific order):
The pre-generated content already contains html/body/etc. tags (as mentioned, it is standalone documentation in its own right).
Redirection is no use, as it bypasses the view mechanism, losing the common layout.
I'm not really sure how to proceed, as I seem to have exhausted my googling ability on this matter. I'd appreciate any tips or pointers on concepts or terminology surrounding what I'm trying to do - I'm happy to do the leg work investigation as required.
have you tried putting your html files in the wwwroot folder and in the Startup.cs Configure method, add the line app.UseStaticFiles();
If you really need to static *.html use
var htmlString = System.IO.File.ReadAllLines(#"patch/to/your.html");
And then pass it to view and render by #Html.Raw() but i not reccomend this way. Better create partial view and then simply use by #Html.Partial() (official docs)

Generate complete HTML website using the structure of a directory and subdirectories

I often have to create a small website, that contains a set of documents (doc, xls, pdf, ppt, ...). The navigation is mostly the same as in the illustration below: chapters -> lessons -> documents. The number of lessons, chapters, documents and types of documents differ. The URL to the document can be the document name (whithout extension) or a custom/definable name per document.
At the moment I do this manually in Dreamweaver which is sometimes quite a job if you're having 100+ documents :)
Now what I want is a sort of tool, that generates me this kind of website, html based, which still gives me the opportunity to add a custom style/css to them. I need some sort of tool that allows me to create a directory structure, add the right files to the right directory, and convert this structure into a (basic) html page. Then afterwards I add a different CSS/Theme to it.
Does anyone has an idea what I can use for this?
I've found a tool called Snap2HTML that does the trick for me. However, I would like it to be more tweakable, as in theme-able, but it's a start :) The tool I found is Snap2HTML http://www.rlvision.com/snap2html/
If anyone knows a good alternative, please let me know.

Automatically apply tinymce validation to all drupal pages

I happen to have inherited a drupal project where a common html validation error seems to occur on nearly every page. The validation error is so minor and easy, I actually only have to open any page up in the editor and the tinymce wysiwig editor will fix the problem automatically and I only need to save the page. Considering I will be needing to do this 30k+ times to apply it to the entire site, is there any way to have it either applied automatically to all pages or automated? Any and all suggestions welcome to help me speed up the process.
EDIT : Used solution
Since I'm not the most adept at finding a programming solution, I did find an addon for firefox letting me record et loop a series of actions called iMacros. Started it up in 5 different instances of FF and let it running all night and it's half done already. Certainly not the most efficient way of doing things, but may be a solution for those who, like me, aren't as advanced in programming.
Assuming you can loop through the pages somehow i would suggest to build a page where you include the code source into the editor root html element (textarea or whatever). Then after onInit (see the tinymce configuration options for this (setup parameter and onInit) ) you trigger the submit or save button which delivers the page to the server where it gets saved.
The pages textarea might then get filled with the code of the next page and so on...
The important part here is that your serverbackend is able to loop through the different pages and knows which page comes next when receiving the modified/corrected page code.

Problems in generating HTML with JasperReports

I am using jasper report with my application and generating the reports in pdf formats, which are coming up fine. We want the user to be able to view those reports in html also with in the application, but generating HTML from jasper contains inline CSS for its individual element which we do not want. (We want to apply our own CSS so that look and feel of application remains same.). If any body has any ideas how it can be done, please help.
Also we do not want large number of records in a single page in html, so any ideas on how we can implement pagination in such a scenario.
I don't think so you can separate the CSSs from the HTML which is generated by the iReport.
To check for some more options please open the export options which are under
Tools->> Options ->> Export Options.