This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
16 Posts
Dazza
5 years ago
4
Topic

Hi,

I've created a custom markup.php file for my template, based on the default ("_markup.php"). What I would like to do is create a new option in the drop-down on the backend that I can reference in my markup.php to change the markup of the field. At the moment there is just two options None and Default (see screen shoot) on "3".

Could anyone give me some pointers?

Regards and Thanks.

Get a Book for SEBLOD
4229 Posts
Kadministrator
5 years ago
3
Level 1

Judging by what code of _markup.php says you can only overrride default option, but you can't create new one 

// The markup around each field (label+value/form) can be Overridden.
// Remove the underscore [_] from the Filename. (filename = markup.php)
// Edit the function name:
// - fields/markup.php => cckMarkup_[template]
// - fields/[contenttype]/markup.php => cckMarkup_[template]_[contenttype]
// - fields/[searchtype]/markup.php => cckMarkup_[template]_[searchtype]
// Write your Custom Markup code. (see default markup below)

16 Posts
Dazza
5 years ago
2
Level 2

Thanks Klas,

OK, I understand. So basically the option for mark up are "None" or Default, and you can only override the default. 

It's a shame that for example you couldn't create a new markup file in the same directory called whatever you wanted your custom markup to be and you would then get that option in the drop down. Pretty much how variations work. 

Thanks again.

3 Posts
Pablo A
2 months ago
1
Level 3

I completeley Agree.
Flexibility with the markup code around each field is a must nowadays

2 months ago
0
Level 4

Hello,

Flexibility with the markup code around each field is a must nowadays

This has been implemented, and will be shipped within our next major release.
Feel free to have a look at the "partial" SEBLOD 4 changelog.

Saba

Get a Book for SEBLOD