Member info page

These documentation pages are no longer maintained. Please visit the new documentation site.

This page will be used to display all the information that we have about a member. Currently, when a member is accessed (using one of the links from within the member list page), eZ publish displays all the attributes of that member using the default object view. The following list of steps explain what you should do to change this.

Append the following lines of code to the TSCM CSS file.

.member_info

{

   border-style: none;

   font-size: 80%;

}

Create a new override for the "/node/view/full.tpl" template.
Feel free to call it "full_view_member_class.tpl".
Set the override keys to the "Member" class and the "Member" section.
Replace the contents (if any) of the generated template file with the code provided below.

<div class="pagetitle">

   Member information

</div>

 

<div class="imageleft">

   {* Display a picture of the member. *}

   {attribute_view_gui attribute=$node.object.data_map.picture}

</div>

 

{* Display the attribute names and their values. *}

<table class="member_info" cellspacing="4" cellpadding="3">

   <tr>

       <td><b>{$node.object.data_map.realname.contentclass_attribute.name}:</b></td>

       <td>{attribute_view_gui attribute=$node.object.data_map.realname}</td>

   </tr>

   <tr>

       <td><b>{$node.object.data_map.nickname.contentclass_attribute.name}:</b></td>

       <td>{attribute_view_gui attribute=$node.object.data_map.nickname}</td>

   </tr>

   <tr>

       <td><b>{$node.object.data_map.birthdate.contentclass_attribute.name}:</b></td>

       <td>{attribute_view_gui attribute=$node.object.data_map.birthdate}</td>

   </tr>

   <tr>

       <td><b>{$node.object.data_map.gender.contentclass_attribute.name}:</b></td>

       <td>{attribute_view_gui attribute=$node.object.data_map.gender}</td>

   </tr>

   <tr>

       <td><b>{$node.object.data_map.phone.contentclass_attribute.name}:</b></td>

       <td>{attribute_view_gui attribute=$node.object.data_map.phone}</td>

   </tr>

   <tr>

       <td><b>{$node.object.data_map.email.contentclass_attribute.name}:</b></td>

       <td>{attribute_view_gui attribute=$node.object.data_map.email}</td>

   </tr>

</table>

This code takes care of displaying member information in a nice way. The picture of a member is displayed at the left hand side. Information about the member (name, phone number, etc.) is displayed on the right hand side (prepended by the name of the attribute). Notice that the names of the attributes is not hardcoded in the template file. Whenever you decide to rename an attribute (for example replace "Real name" with "Name" - you will not have to bother with updating the template file. The following screenshot shows what the output should look like at this point.

Comments

It may help

I made up a table for myself to control what override templates I create. Sections in rows and content classes in columns. So in the intersection of row and column you can set a tick when you create an override template for that pair of parameters ;))

Got it!

So far so good...

Contents

Building an eZ publish site

Prerequisits
Situation
Creating the TSCM site
Testing the interfaces
Setting up the main layout
Creating sections
The welcome page
The news page
The members page
    Creating a custom content class
    Adding members
    List of members
    Member info page
The guestbook
The links page


Created

07/11/2003
4:15:28 pm
by Balazs Halasy

Last updated

07/11/2003
4:25:00 pm
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.