WebSite X5Help Center

 
Bob K.
Bob K.
User

How to work on dynamic contents (for enabled users)  en

Author: Bob K.
Visited 3059, Followers 2, Shared 0  

From the X5 Manual: "To allow enabled users to log in, you must remember to add the necessary field in the website, using, for example, the "Login" widget that can be found in the HTML Code Object and in the editor, in the Header and Footer sections of the Template customization window."

I am unable to find the widget option in the header or footer sections of the template customization window. Which means user asigned to edit the page text is unable to log in, to do changes.  Databse management and access management was completed as well as user asigned to make changes was authorized. I am able to make changes from my computer through the website without having to use a password. But when website is viewed from another computer I was unable to make changes. 

Thanks,

Bob

Posted on the
10 ANSWERS - 3 USEFUL
Paul M.
Paul M.
Moderator

Hello Bob,

The login widget is found on the edit toolbar of the HTML Object, as you probably already know...  but see my attached screenshot if necessary.

The code it generates can be pasted in the header of your template using the 'Insert HTML Code' option in the Template Customization screen.  I will post a second screenshot shortly to illustrate this.

Kind regards,

Paul

Read more
Posted on the from Paul M.
Paul M.
Paul M.
Moderator

Login widget code pasted in HTML Code section of Template Customization screen:

You can adjust the style, width and font of the Login to suit the template you are using as appropriate...  simply alter the relevant values in the HTML code.

Read more
Posted on the from Paul M.
Bob K.
Bob K.
User
Author

Thanks Paul for all your help and time you have given me to an answer my question.

      Now that I have got that part accomplished. Is there any way to not let the public who views your website not see the log in box?  Wished they would just give us a link to a log in so just that person who has access to change the dynamic content knows the link. Like there is a link for admin to check for blog post and members who register with your site.

Sincerely,

Bob 

Read more
Posted on the from Bob K.
Paul M.
Paul M.
Moderator

Yes, this is possible, Bob.  But you will have to take the login out of the header, as anything in the header will be visible on all pages in a WebSite X5 project.

Instead, you place the login widget in the body of an additional page which you create within X5, and then set this page to be 'invisible' using the facility on the edit toolbar in Step 2.  This means that the page will not show in the menu, nor will it be linked to in any other way.  If you have DirectoryIndexing switched off on your server then the only way anyone could access this hidden page is if they were to type in the exact URL in the address bar of their browser.

The chances of anyone stumbling upon the correct sequence of characters is remote in the extreme, and you can make it even harder by giving the page an unusually long name...  here is a flippant example:

bobs_hidden_and_unbelievably_hard_to_find_secret_login_page.php

Sounds silly, but you get the idea...  just make the page name complex.

You would of course only divulge this secret URL to those users who you wish to give access to.  They could then log in by visiting:

http://your_domain_name/bobs_hidden_and_unbelievably_hard_to_find_secret_login_page.php

Once logged in they can traverse your site as normal, editing dynamic content as required.  Depending upon how security conscious you are, you may wish to also implement a logout feature, or alternatively set the login cookies to expire relatively quickly in the users' browsers.

Hope this helps, but if you need clarification on any point just let us know.

Best regards,

Paul

Read more
Posted on the from Paul M.
Bob K.
Bob K.
User
Author

The Dynamic Content is set for multiple pages in my website. I am having a couple of problems using this feature.  1. I have information in the home page, which doesnt show up when first viewing my site.  I have to click on another button/link that goes to a different page to my website and then beack to the home button before I can see the content.  2. When clicking on another button/link I get this error code: 

setDefaultText('Click here to edit the default text!'); $dynObj->loadFromFile(pathCombine(array($imSettings['general']['public_folder'], 'homefile'))); $pa = new ImPrivateArea(); $user = $pa->who_is_logged(); if ($user !== false && (in_array($user['uid'], array('p6r8462q')) || in_array_field($user['groups'], array()) || in_array($user['uid'], $imSettings['access']['admins']))) { if (isset($_POST['ObjectId']) && isset($_POST['PageId']) && $_POST['ObjectId'] == '1' && $_POST['PageId'] == '5') { $dynObj->setContent(imFilterInput($_POST['DefaultText'])); $dynObj->saveToFile(pathCombine(array($imSettings['general']['public_folder'], 'homefile'))); exit(""); } ?>getContent() ?>getContent(); } ?>

But when I leave the home page and click back on the button that shows this information my original content shows up corrctly for those pages that have Dynamic Content in them.  Yes, all pages that use the Dynamic Content Object have this problem when first going into my website. 

I have tried hitting the refresh button on my browser but this didn't work either. Thinking perhaps old data was stored and this would take care of it. Currently I am at a loss as to what to do about this issue. Any help would be much appreciated. 

Sincerely,

Bob

Read more
Posted on the from Bob K.
Incomedia
Claudio D.
Incomedia

Hello Bob,

It can be you are opening the page with .html extension this first time but the dynamic content needs pages with .php extension. I would suggest to remove the old website pages and then upload all again and then it should appear correclty.

the error appaers because the page with the dynamic content object has been uploaded as .html file but it needs to have .php and if you change page and then it appears correctly it seems older files are online and the suggestion I wrote to delte the old pages and then uplaod all again should fix it.

Many thanks!

Read more
Posted on the from Claudio D.
Nicole B.
Nicole B.
User

Paul M, I apologize for asking this question when you were addressing other concerns, but is there any way you can explain how to create the "log out" button you mentioned above? 

Read more
Posted on the from Nicole B.
Paul M.
Paul M.
Moderator

@Nicole: Yes, of course, no problem...

WebSite X5 Professional 11 can automatically create the logout for you:

Step 3 Page Creation > place HTML Code Object on page > double-click on the HTML Code Object once it's on the page to edit its properties...  go to the 'HTML Code' tab > click the 'Insert Widget' icon on the toolbar near top-left, and select 'Logout' > WebSite X5 will offer you the choice of formatting the appearance of your logout link > once you have made your choice(s) click 'OK' and the appropriate HTML code will be added to your HTML Code Object.

That's it!

Kind regards,

Paul

Read more
Posted on the from Paul M.
Duncan Baker
Duncan Baker
User

A little additional point. You can't see the logout until you have been logged in - which is fine - but maybe Nicole B you had not already been logged in if you can't see the logout button.

I think I am right - at least that's how it works here!

Read more
Posted on the from Duncan Baker
Nicole B.
Nicole B.
User

That was it thank you so very much Paul! You have been a huge help with all your tips! 

Read more
Posted on the from Nicole B.