Password protect a web page
Author: Karel C.Is there a feature in X5 that allows you to password-protect a page ? Currently I have to export my website to disk and manipulate the source code, inserting some script and html code at the proper places.
(X5 allows to insert html code in header and body sections, but not always at the right place. For example there is a nice solution that requires '<?php include("password_protect.php"); ?>' as the very first line of a protected page. As far as I know I cannot do that in X5)
Consequently I have to redo that every time I update the website. Moreover I intend to handover the website to the person responsible for content maintenance (it is a bridgeclub information website). I cannot count on this person's knowledge of html and script and manipulation of source files in general.
So preferrably I would like to stay within the capabilities website 5 is offering.
Any suggestion ? Thanks
Hello Karel,
WebSite X5 allows you to insert code anywhere within a page, not just the head and body sections.
To insert code before the head section, go to the Expert tab of the Properties of the page in question, and select 'Before closing the HTML tag' from the Custom Code drop-down menu... then paste your code, <?php include("password_protect.php"); ?> (see the screenshot attached)
However, as an alternative you could use WebSite X5's native ability to produce locked, protected pages. Please see these extracts from the help file for full details of how to do this:
http://help.websitex5.com/en/v12/evo/index.html?es_area.htm
http://help.websitex5.com/en/v12/evo/index.html?area_riservata.htm
Kind regards,
Paul