Template creation for New Table

I am new to oxid frame work and using the community edition with version 4.10.7.
I am trying to assign a view to my new table for a brands. I am making a query in mysql which gives me all the brands listed by user, now I want to render it at the back end. I want to view them as group by company name under the USER at back end. I have created extra tab under menu.xml named as BRAND. I just want to render my table of brands for a particular user(example USER who owns the trade marks or brand will be listed with the details).
Any kind of guidance will be help full.

Thanks in advance for any help.

Hi,
The easiest way to achieve this would be copying and adapting the most similar class of original OXID shop you can find.
In this case you would need something that displays data somehow assigned to a particular object. Have a look at the history tab in user settings, it displays data from oxhistory table for this particular user.
Copy template, copy class, rename both and have a look the the functions of this controller and the corresponding table structure. (1:n relation, for n:n you will need some extras)

Thanks a lot @vanilla_thunder.

I will have a look and try to resolve the problem. If something is not working than will write back.

HI @vanilla_thunder

I have a problem while assigning the template, I am getting just a blank page. nothing in the log as well. The logic in php file seems to be working fine I can see t using print_r function of php. Would be great if you can suggest me something.
Here is the code for the controller:

Below is the Template file:

[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"}]
[{ if $readonly}]
    [{assign var="readonly" value="readonly disabled"}]
[{else}]
    [{assign var="readonly" value="true"}]
[{/if}]

<form name="transfer" id="transfer" action="[{ $oViewConf->getSelfLink() }]" method="post">
    [{ $oViewConf->getHiddenSid() }]
    <input type="hidden" name="oxid" value="[{ $oxid }]">
    <input type="hidden" name="cl" value="userBrandInfoCntl">
</form>

<form name="myedit" id="myedit" action="[{ $oViewConf->getSelfLink() }]" method="post">
[{ $oViewConf->getHiddenSid() }]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="oxid" value="[{ $oxid }]">
<input type="hidden" name="editval[oxuser__oxid]" value="[{ $oxid }]">

<table cellspacing="0" cellpadding="0" border="0" width="98%">
    [{foreach from=$brandList item=brand}]
<tr> 
 <td>[{ $brand->braninfo__RegisterNR->value}]</td>
<td>[{ $brand>brandinfo__Markendarstellung->value}]</td>

    <td>[{ $brand->brandinfo__Aktenzustand->value}]</td><td>[{ $brand->brandinfo__Anmeldetag->value}]</td>
    <td>[{ $brand->brandinfo__Ablaufdatum->value}]</td><td>[{ $brand->brandinfo__Inhaber->value}]</td>

    <td>[{ $brand->brandinfo__Vertretter->value}]</td><td>[{ $brand->brandinfo__zustellanschrift->value}]</td>
    <td>[{ $brand->brandinfo__Klasse->value}]</td><td>[{ $brand->brandinfo__schutzende->value}]</td>
    <td>[{ $brand->brandinfo__begin_Wiederspruch->value}]</td><td>[{ $brand->brandinfo__Ablauf_WiederSpruch->value}]</td>    
 </tr>
 [{/foreach}]
</table>
</form>

Hi Everyone,
I have a problem while assigning the my object variable to smarty, and due to that i am not getting any values in table. Below is the code snippet given if someone can help.
Thanks .

Preformatted text$oMBrand = oxNew(“oxlist”);
$oMBrand->init(“brand”,“myinfo”); //myinfo is the table name
$query = “SELECT * FROM myinfo WHERE company =’”. $this->_firmName."’";
$oMBrand->selectString($query);
$this->_aViewData[‘markeList’] = $oMBrand;

OK I solved it.
Thanks @vanilla_thunder for the support for where to start.