Component global configuration

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Oen44
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jan 16, 2018 4:44 pm

Component global configuration

Postby Oen44 » Tue Jan 16, 2018 5:06 pm

Hello,

I've made my first component based on https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component. Everything works fine as I want. I have a list of products that can be added, edited etc. from control panel. I'm not displaying each product separately but all at the same time on single page. There is also range slider and I want clients to change values (like min, max) for that slider, using configuration from control panel. By following https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_configuration I know that every product has it's own 'params' value and changing something in global configuration won't affect products already created.
How can I make that configuration so every product will read from it?
And is it possible to set title for Global Configuration menu item without language files? I'll be using only one language so I don't need to make language files just for that single thing. Right now it's displaying "com_aquaoferta" as submenu and page title "com_aquaoferta_configuration".

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4246
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Component global configuration

Postby sozzled » Tue Jan 16, 2018 8:20 pm

Oen44 wrote:Is it possible to set title for Global Configuration menu item without language files?
Yes, it's possible but I'm not going to explain how, sorry.

Oen44 wrote:I'll be using only one language so I don't need to make language files just for that single thing.
Even if you have to create one or two language files (and even if these files only contain one or two constants to be translated), it's easier to do it that way. It's also the best practice way to develop Joomla components. I think it's 10-15 minutes well spent. 8)
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

Oen44
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jan 16, 2018 4:44 pm

Re: Component global configuration

Postby Oen44 » Tue Jan 16, 2018 8:24 pm

sozzled wrote:
Oen44 wrote:Is it possible to set title for Global Configuration menu item without language files?
Yes, it's possible but I'm not going to explain how, sorry.

Oen44 wrote:I'll be using only one language so I don't need to make language files just for that single thing.
Even if you have to create one or two language files (and even if these files only contain one or two constants to be translated), it's easier to do it that way. It's also the best practice way to develop Joomla components. I think it's 10-15 minutes well spent. 8)
In that case I'll do it.

How about that configuration part? Is there anything that can help me do that? I thought about separate table in database but then I don't know how to save to that particular table by changing configuration.

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4246
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Component global configuration

Postby sozzled » Tue Jan 16, 2018 8:37 pm

Oen44 wrote:How about that configuration part? Is there anything that can help me do that?
If you mean this question:
Oen44 wrote:How can I make that configuration so every product will read from it?
I'm sorry but I haven't a clue. I don't understand how your component manages "products"; I don't even understand what kinds of "products" you are referring to because I don't know what your component does, sorry.

I was responding to the questions you asked about how (and why) administrator menu items might not display text in more human-readable manner and how those questions might relate, in some way, to Administration Joomla! 3.x. Your other question is about how to build a Joomla component and I think that it's possible better to ask that question (and other questions regarding your component) in the General Questions/New to J! 3.x forum category.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

Oen44
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jan 16, 2018 4:44 pm

Re: Component global configuration

Postby Oen44 » Tue Jan 16, 2018 8:53 pm

sozzled wrote:
Oen44 wrote:How about that configuration part? Is there anything that can help me do that?
If you mean this question:
Oen44 wrote:How can I make that configuration so every product will read from it?
I'm sorry but I haven't a clue. I don't understand how your component manages "products"; I don't even understand what kinds of "products" you are referring to because I don't know what your component does, sorry..

As mentioned in first post, I made my component by following Documentation on how to create simple component.
From here https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Basic_backend I got list of products to save and read from database. They got simple values like name, description, price and image (well, that's all actually). In frontend I'm reading all products at once and then display on the page.
Frontend: https://i.imgur.com/HLB0mlg.png
Backend: https://i.imgur.com/QXI0OGC.png
Configuration: https://i.imgur.com/6n80Bv4.png

That's the only thing that prevents me from finishing my job. I need some options configurable for clients (like values for that blue slider on frontpage).

I don't want to spam new threads honestly. If it's possible to move that thread to General Questions/New to Joomla! 3.x forum category, that would be great.

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4246
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Component global configuration

Postby sozzled » Tue Jan 16, 2018 9:37 pm

Have you fixed the "language" problem (i.e. have you fixed the way your component menu item(s) appear in the administrator site)?
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

Oen44
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jan 16, 2018 4:44 pm

Re: Component global configuration

Postby Oen44 » Tue Jan 16, 2018 9:51 pm

Yes I did fix the problem. It's fine now.

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4246
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Component global configuration

Postby sozzled » Tue Jan 16, 2018 10:21 pm

It is an "unwritten rule" about discussion forums that topics should focus on one particular issue/problem in one place. It becomes extremely confusing for other members of the forum community to understand what problem(s) is/are being discussed if several issues are thrown together within a single topic.

I understand that you don't want to create a flurry of new threads—each one discussing a separate issue—but I can tell you, after many years of experience in using technical forums like this one, it's probably a better way to operate.

I don't know the answers to other questions you've asked in this topic. Perhaps someone else may be able to help but, in my opinion, I think it would be better to create a separate topic in which you clearly spell out what you're trying to do—one piece at a time—how you're going about doing it and what outcome you're expecting from a volunteer-driven forum like this. We're not experts on everything, you know. ;) We're just trying to help in whatever way we can.

Good luck and all the best. 8)
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

Oen44
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jan 16, 2018 4:44 pm

Re: Component global configuration

Postby Oen44 » Tue Jan 16, 2018 10:26 pm

I'm thankful for you help! I'll make new thread then. This one can be closed :)


Return to “Administration Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 4 guests