Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Adding fields after download and custom code added 04 Mar 2014 13:35 #12276

So I keep getting requests from clients to add fields to the components I create for them after I have finished the component (e.g. constructed in j-cook, downloaded and all my custom code added to it). Which leaves me in the predicament of having to spend a lot of extra time rebuilding the component in cook (e.g. adding the extra field), downloading the component and adding my custom code back into it.

So my question is "does anyone have a solution for adding fields to a component after it is finished and potentially live on a site without having to go back into j-cook rebuilding and re-adding my custom code?"

I understand this is basically what j-cook is created to do (take away the need to build components by hand) but it just ends up being an extra long process to add one field to an already finished component.

Any advice greatly welcomed.

Thanks Cefnllys

Please Log in or Create an account to join the conversation.

Adding fields after download and custom code added 05 Mar 2014 17:07 #12279

I do this on a regular basis and generally speaking, the custom code in my forked files work fine and all I do is copy the fork directory to the updated project. Then again, maybe I'm not doing the sort of customization that you are so I'm curious as to what it is that causes the extra work for you?

Dave

Please Log in or Create an account to join the conversation.

Adding fields after download and custom code added 06 Mar 2014 12:28 #12281

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
1. Add fields in database structure.
2. Add these fields in the concerned SQL SELECT queries (ITEM + LIST) > prepareQuery() in models
3. Add those fields in the concerned forms XML files ( for EDIT)
4. Instance these new datas in your views (Fly, lists, etc...) (for VIEW)
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Adding fields after download and custom code added 07 Mar 2014 12:54 #12286

@dyoungers: Thanks for your interest, I often have to put extra where clauses in my list views be it by user or by date (so a user only see's their items or items get filtered by the current date and I have to put this code in the models) also when I set up my views I often have parameters in the component options to turn of the display of things as and when needed in the views, thus my views have a small amount of custom code be it PHP or Javacsript and also the config.xml. There are probably better way of doing this but I am no expert in the ways of Joomla and what knowledge I do have is cobbled together from the joomla documents and the forums here on j-cook

@admin: Thanks very much I will have a go with this method shortly hopefully I wont make too much of a mess of it.

All help very appreciated.

Cheers,
Cefnllys

Please Log in or Create an account to join the conversation.

Adding fields after download and custom code added 09 Mar 2014 00:23 #12287

We all look at things differently and we do what makes sense to each of us. For what its worth, to handle those types of modifications I add the filters to my list view and then fork the views to take the filters off the view and set them explicitly in the code so I don't have to worry about the models. It just seems easier but thats me :-)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.061 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started