Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
I would like to add a simple "welcome-to-your-new-site" screen, perhaps first with a "welcome" and then have the possibility to change the text and perhaps add some news of new functions on the site, or some help on how to use/edit the site

The text should be entered by me (superuser/developer) and shown to the user(s) who is going to use the CMS.
What is the proper way to accomplish this, is it possible?

You can use a template (say named 'message.php') and order it so that it is the first template that gets displayed upon login -
Code: Select all
<cms:template title='Welcome' order='-1'>


Now within this template you may use a type 'message' region and place your content within it e.g.
Code: Select all
<cms:template title='Welcome' order='-1'>
    <cms:editable type='message' name='my_message'>

However, using type 'message' would mean that anytime you need to modify the content, you'll have to edit the template and visit it as super-admin. So this is not an appealing solution for content that changes often.

For that, please try the following solution instead -
Code: Select all
<cms:template title='Welcome' order='-1'>
    <cms:editable type='richtext' name='my_message' label='Message' />
            <cms:if k_user_access_level lt '10'>
                #k_element_my_message{ display: none; }
            <cms:if k_user_access_level eq '10'>
                #my_message{ display: none; }
            <div id="my_message">
                <cms:show my_message />

Here we use a regular type 'richtext' region where you, as super-admin, can input your message.
When the normal user logs in, this region would be *hidden* from her (this we do using the <cms:style> block).
Instead, she will get to see only the contents of that region in a <DIV> (this we do using the <cms:html> block).

Please try it and let me know if this helps.

Thank you, this works perfect and it’s very flexible also! I will continue experimenting with the design of my new welcome-page!

Is there a way that i can remove the ”save”, ”view”! and ”advanced settings”-buttons? I think those buttons will add confusion to the user…

Edit: Is there perhaps a kind of parameter to that config_form_view like: "exclude group"... _advanced_settings_ ???

Edit: Solved it with the great help of another forum-post (yes i know i need to search more!) viewtopic.php?f=4&t=9476&p=20770&hilit=hide+advanced_settings#p20732

The only change i made was that i hided #settings-panel instead of #advanced-settings

Now, im off to find the id's for the save and the view-buttons so i can hide them too :D
Alternatively, you could have used the original solution I posted above in this very thread.
The solution shows you how to conditionally output CSS that can be used to show/hide elements on the page depending on who is logged in.

You only need to use 'Inspect Elements' tool of your browser to get the ID/class etc. of the elements you wish to work with and add the required CSS rules to <cms:style>.
It really is a super-flexible, and easy to work with CMS!!

I think it could be good to have a optional template setting(?) for the admin-area, to be able to hide

- advanced settings, save and view

It can be good when there's a template with "No Editable Regions defined" displayed
5 posts Page 1 of 1