Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Hi,
I want to serve the backend user a field where it can copy directly the frontend url to the clonable page.
I tried to create the url with concenate all parts directly inside a textfield but I don't get the id of the page.

Code: Select all
 <cms:editable type='text' name='meldung_url' label="Meldungs URL" order='90'><cms:show k_page_id />?p=<cms:show k_page_id /></cms:editable>


How can I realise that?

Cheers
Hi,

Could you please let me know why is it that you wish to offer the page's URL as an editable?
Hi,
it is not necessary. No one should change later ther value by hand. Its that the editor can easier share the link on socialmedia or newsletter as e.g.

Cheers
OK, got it :)

You don't then need a literal 'editable' (i.e that can be edited) for doing that.
Just outputting the link should be enough.
For that, please try placing the following (within the <cms:template> block of your template)-
Code: Select all
<cms:config_form_view>

    <cms:field 'my_message' label='Page Link' desc='for sharing with others'>
        <cms:if k_is_page && k_page_id ne '-1'>
            <h3><cms:show k_page_link /></h3>
        </cms:if>
    </cms:field>

</cms:config_form_view>

Make sure to visit the changed template on the frontend as super-admin for the change to take effect.

More details of this technique can be found at viewtopic.php?f=5&t=10241
Hope this helps. Do let me know.
4 posts Page 1 of 1