Results 1 to 7 of 7

Thread: Catalog_ext item edit by logged member wtih (use efg form)

  1. #1
    New user
    Join Date
    02-04-10.
    Posts
    12

    Default Catalog_ext item edit by logged member wtih (use efg form)

    Do you have any idea how realise this quest?
    i have to list catalog item data to form.
    I know there is two posibilties in theory:

    I can use module efg data manage
    i use tl_formdata_details table with catalog extension.
    both have diferent structure.
    i can save data to tl_formdata... table, but antoher structure catalog table use rows, efg table columns.
    Why you did it to me

    another module listing table
    but in this module user cannot edit or deleted item.
    Any other solution or something?

    best regards

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Catalog_ext item edit by logged member wtih (use efg for

    Upgrade to the version 2.0 Alpha which support limited FE editing.

  3. #3
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Catalog_ext item edit by logged member wtih (use efg for

    Hi thyon

    Thanks greatly for producing v2 - I've been waiting for this. I have now upgraded to 2.9 RC1 and my development with Catalog seems to be OK However it was incomplete as I was stuck how to provide an Edit function in the FE

    >Upgrade to the version 2.0 Alpha which support limited FE editing

    Please could you point me in the right direction to see how to do this.

    Ideally, beside a View link on the Catalog List to see the Detail I would like an Edit button to see an editable Detail screen. That screen obviously needs a Save and Cancel buttons.

    Further it would be good to make this conditional, so for example, it would only appear if the current logged-in user = the record creator, e.g. {{catalog::user_id}}={{user::id}} so that users can only edit their own data.

    A conditional Delete link with a confirm dialogue box as well would be even better

    Many thanks for Catalog!

    P.S. I have a community wildlife web site and users keep requesting an option to record their wildlife observations. Having good data on the diverse wild life should help support grant applications.

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Catalog_ext item edit by logged member wtih (use efg for

    Well you need two things. You need to make the Catalog List module have a link for EDIT, you must enable that in the Catalog Edit Legend section with [ x ] Enable Editing and then also choose the page where your Module Catalog EDIT is located.
    Then you need to make a Catalog Edit Module and select which fields are editable.

  5. #5
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Catalog_ext item edit by logged member wtih (use efg for

    Many thanks for your help thyon and for a quick reply

    I've come back to Contao after being away from it for some month and got a bit lost with modules being put under themes - especially as the last 3 icons looked greyed out. I'm sure I will get used to the new layout

    My app is almost there. Final hurdle: Have you any suggestions for restricting record Edits to the authors? I have an auto field in the catalog table called user_id set to {{user::id}}

    1) Is there a way on the List page (perhaps using javascript) of hidding the Edit link (class linkEdit) is the current user is <> to the record user_id (I could add the user_id as a hidden List field using CSS though that would expose the user_ids in the html. The script would have to test each record in the list
    or
    2) is there a way on the Edit page of making the same test and if not matching display a message - could perhaps use CSS to hide the mod_catalogedit block or change it (inner html I think) to an error message: "only the author can edit records"
    or
    3) some server side conditional test - would be better from a security point of view
    Looking at catalog_simple.tpl, could the conditional test be enhanced?

    <?php if ($entry['linkEdit']): ?>
    <div class="linkEdit"><?php echo $entry['linkEdit']; ?></div>
    <?php endif; ?>
    or
    4) List module that everyone can see without Edit + List module with Edit and with an Enable Conditional List and condition that record user_id = logged on userid

    What do you think?

    Many thanks

  6. #6
    New user
    Join Date
    07-01-09.
    Posts
    19

    Default Re: Catalog_ext item edit by logged member wtih (use efg for

    Tying Items to a member is possible by using my catalogitemuseridfield custom fieldtype (available via ER).

    Sadly there is only a German tutorial by MacKP available so far. I hope I will find the time to translate it some time the next days.

    Regards
    Chris

  7. #7
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Catalog_ext item edit by logged member wtih (use efg for

    Chris

    If there is a proven solution then it would be best to use it, so a translation will be much appreciated.

    I did get my option 4 partly working with condition:
    cat_fobmcp_observations.user_id = {{user::id}} +0
    The +0 is needed in case {{user::id}} is blank (no user logged in)

    Unfortunately I cannot set the catalog table field user_id to a default {{user::id}} value - it doesn't get parsed.
    I can use {{user::id}} as a default in my own Add screen but can't see a way of linking the FE Add link to my Add screen.
    I feel dizzy going round in circles

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •