×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
template override of a component creator component
Franz
New Member
Posts: 2
pred 9 rokmi 3 mesiacmi - pred 9 rokmi 3 mesiacmi #951
od Franz
template override of a component creator component bolo vytvorené Franz
hi people!
i created a single table component with just some fields. i downloaded it, extracted it and adapted the list and single-item view as i liked. everything works super fine!
now i am encountering a problem. as i want to install the component build and override the views from my template directory.
is there a certain path like mytemplate/html/com_xy/views/single-item/tmpl/default.php where i can put my overrides?
or do i have to adapt the component directly in it's directory, because no overrides are possible?!?
thanks if anyone knows more!
cheers!
EDIT: found the path myself
for those who are also interested in overriding its: yourTemplateName/html/com_componentName/viewName/default.php
so folders "views" and "tmpl" like in the component structure are not needed while overriding from you template,...
i created a single table component with just some fields. i downloaded it, extracted it and adapted the list and single-item view as i liked. everything works super fine!
now i am encountering a problem. as i want to install the component build and override the views from my template directory.
is there a certain path like mytemplate/html/com_xy/views/single-item/tmpl/default.php where i can put my overrides?
or do i have to adapt the component directly in it's directory, because no overrides are possible?!?
thanks if anyone knows more!
cheers!
EDIT: found the path myself
for those who are also interested in overriding its: yourTemplateName/html/com_componentName/viewName/default.php
so folders "views" and "tmpl" like in the component structure are not needed while overriding from you template,...
Posledný krát upravené:pred 9 rokmi 3 mesiacmi Franz
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Randy Carey
Junior Member
Posts: 23
pred 9 rokmi 3 mesiacmi #952
od Randy Carey
Odpoveď od Randy Carey na tému template override of a component creator component
Keep in mind that we use template overrides to prevent an upgrade by the developer from overwriting our view. But since we are the developer for our own component (and not some third-party over whom we have no control), it shoud be perfectly fine for you to edit the template directly within the component. And when we are the developer, it is prefectly fine to edit the model, controller, add helper classes, etc.
To qualify... If you are still in the early phase of making changes within ComponentCreator and then reinstalling the component wth those changes, then you will want to develop your templates in the override directory. That's what I do early on. But I often inject a good amount of extra code into what Component Creator creates, and when I reach that point, I no longer generate new versions from ComponentCreator - and at that point in development I modify the templates within the component's directories. This is especially important if you will be packaging the component for reuse or distribution as an installable extension.
To qualify... If you are still in the early phase of making changes within ComponentCreator and then reinstalling the component wth those changes, then you will want to develop your templates in the override directory. That's what I do early on. But I often inject a good amount of extra code into what Component Creator creates, and when I reach that point, I no longer generate new versions from ComponentCreator - and at that point in development I modify the templates within the component's directories. This is especially important if you will be packaging the component for reuse or distribution as an installable extension.
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Franz
New Member
Posts: 2
pred 9 rokmi 3 mesiacmi #953
od Franz
Odpoveď od Franz na tému template override of a component creator component
thanks randy!
sure. i have overwritten a lot of third-party-components so far. but this is my first component-creator-component
i just fund it handy so far, as i still add and change fields in the component i built. so instead of overriding the component in it's original directory manually every fresh reinstall, i chose the version by overriding it from templates.
but you are absolutely right! if the component once is finally installed and not subject to further builts inside the cc-website, it doesn't matter where i edit it.
sure. i have overwritten a lot of third-party-components so far. but this is my first component-creator-component
i just fund it handy so far, as i still add and change fields in the component i built. so instead of overriding the component in it's original directory manually every fresh reinstall, i chose the version by overriding it from templates.
but you are absolutely right! if the component once is finally installed and not subject to further builts inside the cc-website, it doesn't matter where i edit it.
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Čas vytvorenia stránky: 0.054 sekúnd