by
KK » Sat Feb 01, 2025 12:48 pm
Hi,
Please allow me to digress a little before I come to your question.
I have two points to make -
As you would have gleaned from the docs, there are two ways of defining the editable regions -
1. Inline with the HTML (as you have done)
2. Separately within the <cms:template> block (which is usually at the very top of the template).
From the perspective of the end-user (the one who manages the admin-panel), there is no difference between the two methods as the editable regions appear in the admin-panel just the same through both. However, from the perspective of the developer, you'll soon realize that the second method (i.e. with <cms:template>) is usually better because you have all the regions at one place.
The second point - we can certainly make any existing HTML markup editable by wrapping <cms:editable> around it but please consider the following implication:
If that HTML depends on inline classes, styles or nested tags, remember that it would be very easy for the user to edit out and destroy these elements thus ruining the look of your design. So, the recommended way is to present *only* the textual elements to the user for editing and not the design elements.
With those two points made, let us see how they are relevant in handling your particular situation -
1. Define two plain text editable regions in the <cms:template> block
- Code: Select all
<cms:template>
<cms:editable name='titulo_principal_1' type='text' />
<cms:editable name='titulo_principal_2' type='text' />
</cms:template>
2. Next use them in your code as follows -
Original:- Code: Select all
<h1 class="text-white">
<span class="fw-3"> Have a Professional Website </span> Attract More Clients to Your Firm.
</h1>
Modified:- Code: Select all
<h1 class="text-white">
<span class="fw-3"> <cms:show titulo_principal_1 /> </span> <cms:show titulo_principal_2 />.
</h1>
You may want to use 'label' attribute with <cms:editable /> to make their usage clearer to the user.
An now you can see that the design aspect of your HTML cannot be in any way disturbed by the user and he can make the necessary edits.
As for the other problem that you mentioned -
Another issue is that the login screen is prompted when accessing the site, making it inaccessible without login credentials.
Please check under the 'Advanced settings' while editing the template in the admin-panel and make sure that the 'Access level' dropdown is set to 'Everybody'.
Hope this helps.