Jump to content

Search the Community

Showing results for tags 'develop'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hello, I was thinking that some modules use custom fields. The problem is that they could conflict with already existing fields on the site. example: you module wants to use a field named "category", but the site already stores a "category" field that has a different implementation, other field type, etc. The solution I think is simple, just add a prefix to the fields that the module uses. three letters and a underscore before the field name. example cls_category But its prettier to call "$module->category" than "$module->cls_category" This will be solved using a simple module just for hooks that is installed alongside our module. $wire->addHookProperty("Page(template=cls_mymodule)::category", function(HookEvent $event){ $page = $event->object; return $event->return = $page->cls_category; }); We are adding a property hook that simplifies the field name. This way it can be called like $module->category also the template names are prefixed. Please tell me if there are other ways thanks.
×
×
  • Create New...