Z
Z
z00912014-10-15 11:44:44
MODX
z0091, 2014-10-15 11:44:44

How to create Custom Resource Classes based on modResource in CMF Modx Revo?

Hey!
When creating my component for modx, I encountered the following problem.
Created a custom cmBrand class that extends modResource.

<object class="cmBrand" extends="modResource">
    <field key="class_key" dbtype="varchar" precision="100" phptype="string" null="false" default="cmBrand" />
  </object>

Customized resource creation panel. Everything seemed to be working as it should. The panel looks like I intended, in the resource tree there is an opportunity to create my type of resource. Url looks like it should when created ?id=0&a=resource/create&class_key=cmBrand&parent=0&context_key=web. But when creating a resource, the modResource object is written to the database and not mine. I can't understand why.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question