Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Howto programatically set a block name

$
0
0

When you create an instance of a block in the CMS, you give it a name, which defaults to something like "new block 1" and you can set the blocks properties  (e.g. "SKU" and "Country")

When the block is saved or edited in the CMS, we want to programatically set or change the blocks name to be a function of the properties, e.g. "Country-SKU" e.g. "UK-1234".

When you defined a block in code, you dont need to define a controller.  I am guessing there is a way to create a block controller which handles saving?

Does anyone have an example of this?


Viewing all articles
Browse latest Browse all 6894

Trending Articles