×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Implement business logic
XELESS KFT
New Member
Posts: 2
6 năm 3 tháng trước #1826
bởi XELESS KFT
Implement business logic was created by XELESS KFT
Hi there! What if I was implemented the business logic into my component on model level then reconized that something is missing (for example a field) . Will the new component overwrite all the files in component? If so what is the best way to implement my custom code into the component? I would not like to diff these changed files every time if i had to re-create my component. I hope my question is clear. Thanks for your help.
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Jamila
Khách
6 năm 3 tháng trước #1828
bởi Jamila
Replied by Jamila on topic Implement business logic
Hi there,
Yes, as soon as you install the new component, all the files will be overwritten. The only way you can keep your custom code is by copying and pasting them into the new component.
We would like to recommend to diff the latest component generated with the older component generated and include the changes in the modified version of your component.
I hope this information helps.
Best regards,
Jamila Cisse
Yes, as soon as you install the new component, all the files will be overwritten. The only way you can keep your custom code is by copying and pasting them into the new component.
We would like to recommend to diff the latest component generated with the older component generated and include the changes in the modified version of your component.
I hope this information helps.
Best regards,
Jamila Cisse
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Pieter-Jan van Rossen
New Member
Posts: 11
6 năm 3 tháng trước #1829
bởi Pieter-Jan van Rossen
Replied by Pieter-Jan van Rossen on topic Implement business logic
Tip: use overrides bij adding your default.php to templates/YOUR_TEMPLATE/html/YOUR_COMPONENT/YOUR_VIEW/. This can be done on frontend, as well as backend (administrator/templates/YOUR_ADMIN_TEMPLATE/html/YOUR_COMPONENT/YOUR_VIEW)
In that way you can always keep your changes. Mind that if you add fields, these are not automaticly added in your override.
More on overrides: docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core
Especially in development this is the easiest way to prevent your component being overwritten when installing a update. I recommend doing this also in production, so you can easily update/fix your component.
In that way you can always keep your changes. Mind that if you add fields, these are not automaticly added in your override.
More on overrides: docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core
Especially in development this is the easiest way to prevent your component being overwritten when installing a update. I recommend doing this also in production, so you can easily update/fix your component.
Những thành viên sau(s) đã Cảm ơn: Søren Beck Jensen
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Pieter-Jan van Rossen
New Member
Posts: 11
6 năm 3 tháng trước #1833
bởi Pieter-Jan van Rossen
Replied by Pieter-Jan van Rossen on topic Implement business logic
wow, the forum played som trick on me, sorry for posting the same reply 4 times (but why?).
Anyway, a little addon on my previous comment, you can find your views for frontend in site/views, for backend in administrator/views. Copy those to your html-folder in your template. Mind that in de component the default.php (or edit.php for backend form views) is located in a tmpl folder. Move it out of the tmpl folder, so the file is directly in your view folder (i.e. templates/YOUR_TEMPLATE/html/YOUR-COMPONENT/YOUR_VIEW/default.php)
Anyway, a little addon on my previous comment, you can find your views for frontend in site/views, for backend in administrator/views. Copy those to your html-folder in your template. Mind that in de component the default.php (or edit.php for backend form views) is located in a tmpl folder. Move it out of the tmpl folder, so the file is directly in your view folder (i.e. templates/YOUR_TEMPLATE/html/YOUR-COMPONENT/YOUR_VIEW/default.php)
Những thành viên sau(s) đã Cảm ơn: Søren Beck Jensen
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Thời gian tải trang: 0.069 giây