Fork me on GitHub

how to show property labels one by one for modifying in user Profile  Bottom

  • Hi,

    I'm trying to change the look of page (index.php?module=Profile&func=modify), where user can modify his user information. On this page, there is this code:

    Code

    <!--[foreach from=$duditems item=item]-->
    <!--[if $item.prop_weight gt 0]-->
    <!--[dudoptionalitemmodify item=$item]-->
    <!--[/if]-->
    <!--[/foreach]-->

    - which shows all property labels for modifying (created by admin in admin->users), but I need to know the code which shows only the property label I need, so, this code should show in the end on the page for example something like this:

    Code

    <div class="pn-adminformrow">
    <label for="prop_country">Country</label>
    <label><input name="dynadata[COUNTRY]" value="Country 1" type="radio">Country 1</label><br>
    <label><input name="dynadata[COUNTRY]" value="Country 2" type="radio">Country 2</label>
    </div>

    Any ideas?

    Thanks!




    edited by: mdee24, Jan 28, 2008 - 07:16 PM
  • oh, god, I'm blind :( I found the solution - it's in the function.dudoptionalitemmodify.php in plugins folder. It should works when you put:

    Code

    <!--[dudoptionalitemmodify proplabel="_XXX" uid=$uid]-->
    on the page, but for me it's not working icon_frown Can someone confirm it? Then I'll put this on bug tracker.
  • Confirmed and fixed in SVN. However this approach, while valid, isn't the most efficient. Since the template already has each DUD property (this is what the current template loops over) why force the plugin to get the same info again.

    Each DUD property is assigned to template as part of the duditems template variable as part of an array with the property label as the index so we can display an individual field using the following template tag.

    Code

    <!--[dudoptionalitemmodify item=$duditems._PROP_LABEL]-->


    e.g.

    Code

    <!--[dudoptionalitemmodify item=$duditems._UREALNAME]-->


    -Mark

    --
    Visit My homepage and Zikula themes.
  • Mark, ok, thanks!

This list is based on users active over the last 60 minutes.