Platon Technologies
neprihlásený Prihlásiť Registrácia
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 23. január 2017
O nás
Otvorený softvér
Index  »  Projekty  »  phpMyEdit  »  Dokumentácia  »  HTML  »  Options variability

4.11. Options variability

This section does not descibe new field options. It just extends the possibility of their initialization. Options variability can be applied to each field option.

There is often a situation when you want to have some field option in effect only on particular page(s). But on other pages you do not want to have this option in effect. There are pages where a field option should be taken into consideration, but there are also pages where the option should not appear.

A good example for this is the ['trimlen'] option. Imagine you set something like this:

Example 4-43. Init without options variability

$opts['fdd']['col_name']['trimlen'] = 30;
This will trim the maximum length of text to 30 characters on all possible pages, which in this case are:

  • table list
  • table filter
  • record view
  • record delete

This is nice and it will work as expected, however on the record view page it may be desirable to see the whole field content, not only first 30 characters. Similarly we could want this also for delete page.

Thus there is a possiblity to restrict a particular option to affect only selected types of pages. In our case we want to resctrict the ['trimlen'] option to affect the table listing and table filtering pages. This can be done in the following way. Take a look at "|LF" string in the definition.

Example 4-44. Init with options variability

$opts['fdd']['col_name']['trimlen|LF'] = 30;

Each restriction letter stands for particular page type. They are the same as those described in list under Display options subsection.

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov