astridx / meinblog

4 stars 5 forks source link

en/joomla-module-installation-script/ #64

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Modules - Installation script | Astrid Günther

In this chapter we add an installation script. In the explanations of the component, I described what you use it for. For impatient people…

https://blog.astrid-guenther.de/en/joomla-module-installation-script/

frahmanf commented 2 years ago

Hi, Can you upload more tutorials?

How can I add my component to the module? for showing display any position.

Does there have any code? Please make one.

astridx commented 2 years ago

I'm not sure I understand you correctly. But if you want to use the model of a component in a module, you can do it for example like this: https://github.com/joomla/joomla-cms/blob/4c31b88a2cddd882e87e161afd614cba76ca3057/modules/mod_banners/mod_banners.php#L21

frahmanf commented 2 years ago

Hi, Thanks for your replay. I mean, I've done a component development, I want to put that component in a module to place it in any position of the display.

Does the replay you gave me to match my requirement?

astridx commented 2 years ago

I think you are mixing a component, such as the one used in ReactJs, with the use in Joomla. Here you can read what elements there are in Joomla and how they are applied. Search for "Joomla 4 offers five types of extensions"

frahmanf commented 2 years ago

You see this module, all its contents have to be created in the component and I do not understand how its contents are transferred to the module.

Module Administrator SS: https://prnt.sc/DEy4lrVnuS4t

Module link: https://www.joomshaper.com/joomla-extensions/sp-simple-portfolio

astridx commented 2 years ago

You see this module, all its contents have to be created in the component and I do not understand how its contents are transferred to the module.

In that case, I think my first answer is the right one. Assuming is a Joomla 4 component that supports the function. Have you tried it?

frahmanf commented 2 years ago

Thanks for your reply and help me.

frahmanf commented 2 years ago

Hi, I am facing another problem. When I add the assets folder for custom styles like CSS and JS this not working. Can you teach me, how to add the assets folder properly?

Here is my assets folder added screenshot https://prnt.sc/m_0MxN6SLS7g but this not working 😭😭😢

frahmanf commented 2 years ago

Hi, Can you give me instructions about this?

astridx commented 2 years ago

For assets like CSS or JavaScript you should use the Joomla Web Asset Manager in Joomla 4. Here I have included a JS file via the Web Asset Manger:

https://blog.astrid-guenther.de/en/joomla-clientseiteige-validierung/

Maybe this helps you?

frahmanf commented 2 years ago

There is any way to without using the media folder to use CSS and JS? This way https://prnt.sc/m_0MxN6SLS7g