Displaying certain Custom Attributes

Permalink
Hi, I am trying to create a profile page on my concrete5 website, I have added some custom attributes such as name, telephone and address which work great and they are displayed into my custom profile edit page, however the custom attributes are not displayed as neatly as I wanted. I have some CSS which lays out form fields in tow colomns so they are side by side. The problem arrises with this line of code:
$af = Loader::helper('form/attribute');
                        $af->setAttributeObject($ui);
                        foreach($attribs as $ak) {
                            print '<div class="cbp-mc-column half-width-column">';
                               print $af->display($ak, $ak->isAttributeKeyRequiredOnProfile($ak, 'displaySanitized', 'display'));
                            print '</div>';
                        } ?>

The DIV class is my css which will put each entitie in a column next to another, but as the address field which contains severel fields is one entitiy and I have two other it will put all the address fields in one column rather than each field. i have targetted the address form file and put my div class around each one to get around it and change the code to:
$af = Loader::helper('form/attribute');
                        $af->setAttributeObject($ui);
                        foreach($attribs as $ak) {
                               print $af->display($ak, $ak->isAttributeKeyRequiredOnProfile($ak, 'displaySanitized', 'display'));
                        } ?>

This then stops displaying the name and telephone in the columns. My questionstherefore is, can I target each attribute I call? so I can have a line of code which will be something similar to the above but will only display name and telehone so I can seperate them and make sure each one is displayed in section on my site?

I hope I made sense. thanks in advance.

Ian

 
fudyartanto replied on at Permalink Reply
fudyartanto
Why you not load Page object and then get attribute page..? more simple I think.