Thursday, 23 June 2011

Simple front end editing with feeditadvanced

If you need to allow people to edit things other than pages and content on the front end of your TYPO3 site you can use some simple typoscript and feeditadvanced to achieve it. The following example lets you edit front end users on the storage page 13.

temp.recordEditor = CONTENT
temp.recordEditor {
    table = fe_users
    select.pidInList = 13
    renderObj = COA_INT
    renderObj {
        10 = TEXT
        10 {
            field = name
            wrap =<div>|</div>
            stdWrap.editPanel = 1
            stdWrap.editPanel {
                allow = edit,new,delete,hide
                line = 10
                label = %s
                onlyCurrentPid = 0
                previewBorder = 0
                edit.displayRecord = 1
            }
        }
    }
}



Then you just have to attach this to the page somewhere (eg page.10 < temp.recordEditor). You can edit any table this way (tt_address, tt_news, your own custom table) by changing the table and field selection.

Of course anyone who wants to edit the records will have to be logged into the back end and have proper access to the page/records. You can allow users from the front end to edit things by using the simulate back end user extension: http://typo3.org/extensions/repository/view/simulatebe/current/

You may need to setup feeditadvanced specially for this, I use the following TSConfig:

FeEdit.disable = 0
FeEdit.useAjax = 0
FeEdit.reloadPageOnContentUpdate = 1
FeEdit.clickContentToEdit = 1
FeEdit.menuBar.disable = 1


You seem to need reloadPageOnContentUpdate because I find the records don't get updated properly unless the page is reloaded.

No comments:

Post a Comment