8 years ago
2
Topic

Faced with the problem - it was necessary to withdraw Seb_table template field with special formatting. I decided to use the file markup.php who placed in the folder "Fields" of the template. Wrote a redefinition of the field, but to my surprise, nothing worked ... Tell me, what am I doing wrong? Here is the text file:

defined( '_JEXEC' ) or die;

function cckMarkup_seb_table( $cck, $html, $field, $options ) { 

if ($field->name == 'images') { 

$image = array_slice($field->value,0, 5); 

foreach ($image as $k => $elem ) 

$html.='<a href="'. $elem->value .'" target="_blank" type="image" data-mediabox-group="group'. $cck-> id .'"><img src="' . $elem->value . '"></a>'; 

return $html; 

}

Get a Book for SEBLOD
4229 Posts
Kadministrator
8 years ago
0
Level 1

The same as positon override, you need to place override in the fields/CONTENT_TYPE/markup.php - could it be you missed content type part?

8 years ago
0
Level 1

I have a type of search "sanatrii", I was in the folder "fields" has created a folder "sanatrii" and put the file "markup.php" and slightly modified code in it:

...

function cckMarkup_seb_table_sanatrii( $cck, $html, $field, $options ) {

....

 }

But it still did not work ... What's my mistake?

Get a VIP membership