Custom List Help

I am looking into building a custom list and I have already reviewed the wiki at:

http://fabrikar.com/wiki/index.php/3.x_List_Templates#Template_Overrides

I must say I am very confused after reviewing it. I know very little about css and divs.

I am wondering if anyone can help point me in the right direction to what I am looking to accomplish so I may learn how this done. I have tried google but I not sure I really know what I am searching for. Attached is a picture of what I would like to accomplish.
 

Attachments

  • list example.png
    list example.png
    54.9 KB · Views: 221
I believe you want a custom template rather than a template override.

Have a look at the List DIV template, I think that's more what you are looking for. You can change the template within your List settings.
 
Ok I am wanting to change the structure so I would need to edit the div template...

However I am not sure which file is the div template...... I did download the div template from the download area as well is that what I am looking for...
 
also the div template requires this file

require_once(JPATH_SITE .DS.'administrator'.DS.'includes'.DS.'pageNavigation.php');

Which does not exist
 
can you answer me how many files are in the git hub update it seems i am only uploading about 3900 files and when I extract it say 4900 files
 
Make sure you upload with "Always overwrite" set in your ftp client, don't let it "Only overwrite if newer".

-- hugh
 
Ok I did that.... now I am getting this error on a forms page.


Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/15/10309615/html/components/com_fabrik/models/elementlist.php on line 506

Warning: in_array() expects parameter 2 to be array, integer given in /home/content/15/10309615/html/components/com_fabrik/helpers/html.php on line 1556

Warning: in_array() expects parameter 2 to be array, integer given in /home/content/15/10309615/html/components/com_fabrik/helpers/html.php on line 1556

Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/15/10309615/html/components/com_fabrik/models/elementlist.php on line 506

Warning: in_array() expects parameter 2 to be array, integer given in /home/content/15/10309615/html/components/com_fabrik/models/elementlist.php on line 529

Warning: in_array() expects parameter 2 to be array, integer given in /home/content/15/10309615/html/components/com_fabrik/models/elementlist.php on line 529

Fatal error: Call to undefined function apache_request_headers() in /home/content/15/10309615/html/components/com_fabrik/helpers/html.php on line 155
 
Please look at this and let me know if I am moving in the right direction

This is what I have done for the div's however I have yet to intergrate this with fabrikar code.... That will be the next step of my learning... But I wanted to get feedback on if I have done this part correctly even though I have yet to figure out exactly how to style my roster table:

PHP:
<style type="text/css">
.container {
	background-color: #333;
	height: auto;
	width: 700px;
	color: #FFF;
}
.container .roster {
	font-weight: bold;
	
}
.container .coursetype {
	clear: none;
	float: left;
	height: auto;
	width: 350px;
	color: #FFF;
	font-weight: bold;
}
.coursestatus {
	font-weight: bold;
	text-transform: capitalize;
	color: #FFF;
	clear: right;
	float: left;
	width: 350px;
	text-align: right;
}
.container .coursename {
	font-weight: bold;
	color: #FFF;
	width: 700px;
	clear: left;
	float: left;
}
</style>
<div class="container">
  <div class="coursetype">Type of Course</div>
  <div class="coursestatus">Course Status</div>
  <div class="coursename">Course Name</div>
  <div class="coursedates">Start Date to End Date</div>
  <div class="daysofweek">Content for  class "daysofweek" Goes Here</div>
  <div class="roster">
    <p>ROSTER</p>
    <table width="683" border="1">
      <tr>
        <td width="267"><div align="center"><strong>Student</strong></div></td>
        <td width="25"><div align="center"><strong>R</strong></div></td>
        <td width="28"><div align="center"><strong>M</strong></div></td>
        <td width="24"><div align="center"><strong>L</strong></div></td>
        <td width="85"><div align="center"><strong>Drugtest</strong></div></td>
        <td width="100"><div align="center"><strong>Background</strong></div></td>
        <td width="108"><div align="center"><strong>Status</strong></div></td>
      </tr>
    </table>
    <p>&nbsp;</p>
  </div>
</div>
 

Attachments

  • divsetup.PNG
    divsetup.PNG
    8.3 KB · Views: 179
So how does this look???

PHP:
<style type="text/css">
.container {
	background-color: #333;
	height: auto;
	width: 700px;
	color: #FFF;
}
.container .roster {
	font-weight: bold;
	
}
.container .coursetype {
	clear: none;
	float: left;
	height: auto;
	width: 350px;
	color: #FFF;
	font-weight: bold;
}
.coursestatus {
	font-weight: bold;
	text-transform: capitalize;
	color: #FFF;
	clear: right;
	float: left;
	width: 350px;
	text-align: right;
}
.container .coursename {
	font-weight: bold;
	color: #FFF;
	width: 700px;
	clear: left;
	float: left;
}
</style>
<div class="container">
  <div class="coursetype"><?php echo $this->_row->data->courses___coursetype;?></div>
  <div class="coursestatus"><?php echo $this->_row->data->courses___status;?></div>
  <div class="coursename"><?php echo $this->_row->data->courses___coursename;?></div>
  <div class="coursedates"><?php echo $this->_row->data->courses___startdate;?> to <?php echo $this->_row->data->courses___enddate;?></div>
  <div class="daysofweek"><?php echo $this->_row->data->courses___dayofweek;?></div>
  <div class="roster">
    <p>ROSTER</p>
    <table width="683" border="1">
      <tr>
        <td width="267"><div align="center"><strong>Student</strong></div></td>
        <td width="25"><div align="center"><strong>R</strong></div></td>
        <td width="28"><div align="center"><strong>M</strong></div></td>
        <td width="24"><div align="center"><strong>L</strong></div></td>
        <td width="85"><div align="center"><strong>Drugtest</strong></div></td>
        <td width="100"><div align="center"><strong>Background</strong></div></td>
        <td width="108"><div align="center"><strong>Status</strong></div></td>
      </tr>
    </table>
    <p>&nbsp;</p>
  </div>
</div>

Also the table in this mess i has info from a join so would i be using this to display the data

PHP:
<?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?>

if so could you explain the {'##1___##2-##3-##4_list_heading'} part...
 
Getting very close to a finished product

This is the code that was placed in the default_row.php removing all previous code in that file....

PHP:
<style type="text/css">
.container {
	background-color: #333;
	height: auto;
	width: auto;
	color: #FFF;
	padding: 10px;
	margin: 10px;
	border: 1px solid #333;
	border-radius: 25px;
	-moz-border-radius: 25px;
}
.container .roster {
	font-weight: bold;
}
.container .coursetype {
	clear: none;
	float: left;
	height: auto;
	width: auto;
	color: #FFF;
	font-weight: bold;
}
.coursestatus {
	font-weight: bold;
	text-transform: capitalize;
	color: #FFF;
	clear: right;
	float: right;
	width: auto;
	text-align: right;
}
.container .coursedates {
	clear: both;
}
.container .daysofweek {
	clear: both;
}
.container .coursename {
	font-weight: bold;
	color: #FFF;
	width: 700px;
	clear: left;
	float: left;
}
</style>
<div class="container">
  <div class="coursetype"><?php echo $this->_row->data->courses___coursetype;?></div>
  <div class="coursestatus"><?php echo $this->_row->data->courses___status;?></div>
  <div class="coursename"><?php echo $this->_row->data->courses___coursename;?></div>
  <div class="coursedates"><?php echo $this->_row->data->courses___startdate;?> to <?php echo $this->_row->data->courses___enddate;?></div>
  <div class="daysofweek"><?php echo $this->_row->data->courses___dayofweek;?></div>
  <div class="roster">
    <p>ROSTER</p>
    <table width="683" border="1">
      <tr>
        <th width="auto"><div align="center"><strong>Student</strong></div></th>
        <th width="auto"><div align="center"><strong>R</strong></div></th>
        <th width="auto"><div align="center"><strong>M</strong></div></th>
        <th width="auto"><div align="center"><strong>L</strong></div></th>
        <th width="auto"><div align="center"><strong>Drugtest</strong></div></th>
        <th width="auto"><div align="center"><strong>Background</strong></div></th>
        <th width="auto"><div align="center"><strong>Status</strong></div></th>
      </tr>
      <tr>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
        <td><?php echo $this->_row->data->{'##1___##2-##3-##4_list_heading'};?></td>
      </tr>
    </table>
    <p>&nbsp;</p>
  </div>
</div>

The above code is where I stand.... I am now having a problem with the table and getting the data to show..... I am unsure what to put here {'##1___##2-##3-##4_list_heading'}.....

The data that will appear in this table are joined records hence

courses is joined to course_students

I am thinking it might go something like this

{'course_students___userid-courses-##4_list_heading'}
 

Attachments

  • newlistlook.PNG
    newlistlook.PNG
    33.9 KB · Views: 198
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top