Can hooks control the column widths?

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
HBmike
Posts: 18
Joined: 2013-08-30 18:02

Can hooks control the column widths?

Post by HBmike » 2013-09-06 17:34

I am playing with hooks while I wait for some feedback on the higher ups on the flow of the site so far.

I know I can edit the table_view.php with the
$x->ColWidth = array( 150, 150, 150, 150, 150, 150, 150, 150);

However, after experimenting, I cannot get hooks to control it. Is there a special call?
I tried $ColWidth and even tried just copy/paste it. But no avail.

Any ideas? I would like to be able to control some of the design aspects without editing the generated code in case they come back with more columns and what not to add.

Thanks!

Mike

benzoD
Veteran Member
Posts: 69
Joined: 2013-01-31 21:16

Re: Can hooks control the column widths?

Post by benzoD » 2013-09-09 17:00

When I've needed to do this I created a new css file, included it in the generated page (where you want the changes to occur) after the main style.css, and put my style changes there. This will not be overwritten by generated code and you have all of your edits in a convenient place instead of peppered throughout different pages.

HBmike
Posts: 18
Joined: 2013-08-30 18:02

Re: Can hooks control the column widths?

Post by HBmike » 2013-09-10 15:51

I was finally able to control them. Only by placing all of the following in the hook

function Shop_init(&$options, $memberInfo, &$args){

$options->ShowTableHeader = 1;
$options->ColWidth = array( 150, 15, 15, 15, 15, 15, 10, 15);
$options->ColCaption = array("Customer", "Order Type", "Status", "Start date", "End date", "Assigned employee", "Del", "Sales");
$options->ColNumber = array(2, 4, 5, 6, 7, 8, 9, 10);

Without :
$options->ShowTableHeader = 1;
in the hook, the columns were not changed. Not sure why it works. But it does.

Post Reply