I am frequently changing code in a Dreamweaver template, and every time I do so, the "Update Template Files" dialog box appears, followed by the "Update Pages" dialog box which I have to manually close. Is there any way to have my inheriting HTML documents automatically update, without having to deal with the 2 dialog boxes, every time I save the Template?
I am coming from developing ASP.NET in Visual Studio, which only requires a quick save, and a reload on the browser. This may seem like a petty problem, but the frequency of it is getting to me quickly...
No, you must go through the Update Pages dialogs if you are using Dreamweaver Templates. The only way to truly get rid of it is to switch out of Templates entirely and use some form of include call to handle the "templated" areas of your site. Editing the called include file and saving it will update all pages that use that file. Just like Templates without the slow dialogs and occasional bugs
Related
I'm using some templates to work around some use cases in mediawiki and if an untrained user edits these templates my site functionality breaks in some places.
I want the users to be able to edit some sites with this extension, but if they edit the source code of the template the functionality breaks.
Is there a way to disallow users or disable the source code editing for mediawiki entries or set rules for user groups to disallow source editing? Is it still possible for the users to edit the pages with the form editor?
You could attempt to modify the edit page via a hook like https://www.mediawiki.org/wiki/Manual:Hooks/EditPage::showEditForm:fields
By removing inputs or making fields readonly and adding a notification to use the form, you should be able to get a situation where pages are not editable vie the edit page directly. I'm not sure if that would affect form editing though.
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)
I have got a desktop application which logs into a file, opening a file called application.log each time it wants to log something, appending text and then closing it again.
I would like to create a html page showing the content of the file and automatically showing the changes.
How can I achieve this? I think that refreshing the page is not a good idea because this is not instantaneous. Maybe I need something always going in the background, constantly monitoring the file.
Or maybe when my program changes the file it should somehow notify the webpage that the file had changed, making it update the content?
You can’t do dynamic things in HTML. HTML is just a mark up language.
I haven’t done that before, but I would try to achieve it with Java Script and the reload() function every time you logged sth.
I cloned this https://github.com/Chainfrog-dev/async_flask_2, it is a Python module which communicates with a web page using sockets.
I made the obvious modifications to the code and I ended up with a terminal-style logger which automatically updates its content without the need to refresh the page.
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.
Have a wiki installed in our organization, and want to start using it.
Failed to find the answers for the next 2 basic questions:
How do I configure the entry page to show a list of all existing pages
How do I create a new page (!). Only succeeded doing it by typing a url of an non existing page. Guess there are nicer methods for this
Thanks
Gidi
For how to show a list of all pages, look at DynamicPageList, which is part of MediaWiki. (There's a more advanced third-party version, but it's not needed for such a simple task.)
Creating a new page really is exactly as you said: Type a URL and save some edits. Most beginning editors will edit a link into a page, and then use that link to browse to the page, so that they don't accidentally forget the spelling and lose the page to the Ether. (Of course it would show up in the recently edited and other special pages.)
This is more of a webapps.stackexchange.com question though.