Keyword

Philosophical question - item retrieval/display?

  • Brian
  • Brian's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 9 months ago #134890 by Brian
I am well underway with my site's design, but I am starting to wonder if I am going about things ideally. My site is generally centered on working groups within an int'l organization, and the groups have various content. Papers, books. And there is also news associated with the groups. When someone clicks on a working group subcat, I want the page to be dynamically loaded. So functionally, you would have this

[retrieve papers that are associated with current working group]
[display items in a tab]
[retrieve news associated with current working group]
[display news in tab]
etc

Using modules is proving to be unmanageable, because there are 9 groups and I can't create 20 plus modules and worry about editing each one when I want to make a change to the display.

So what would you do if you were me? Do I need to be manually making calls to the Joomla API?

One idea I had today was to create a module for a particular type of item, papers, for instance. Then in categories.php maybe I could alter that module's params on the fly so that it gets papers for the current working group. But that will not be so straightforward because I am not sure about all the system calls I would have to make. Stepping through the module rendering process in a debugger today made my head spin with the complexity. Really, I am just trying to fetch items and display them with the same styling as the module... There has to be a simple elegant way to do this.

Thanks!
Brian

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 9 months ago #134892 by Krikor Boghossian
Replied by Krikor Boghossian on topic Philosophical question - item retrieval/display?
This is a tricky question Brian indeed.

You can do the following but it requires some work.
Map working group subcats to menu items. All of them.
If you want it to load dynamically you can get the results of the menu item (only the main content, an html element with an id preferably) and load it via AJAX in your container.

It is the same concept as infinite scrolling. You get the link's content and you render it in a predefined area in your template. This way you won't have to publish any modules at all.

Users with no js (if there are any) and bots see the regular menu.

PS. I would like to see the finished site.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Brian
  • Brian's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 9 months ago #134900 by Brian
Hi,

I don't think I am familiar yet with joomla, Ajax, K2 to do what you suggested. The menus and cats/subcats are already mapped. Each subcat is a menu item of type K2 Content. So when you click a subcat you come to a regular K2 categories page, and it is there where I am trying to add the tabs for the different types of items associated with the subcats.

What I was thinking was that I could just use the xperttabs module display code in categories.php and just use queries to get the items based on the current subcat. But I am sure that is harder than I think!

Given the above description, do you think your approach would still work? If so, could you show me an example?

Thanks!!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 9 months ago - 9 years 9 months ago #134920 by Krikor Boghossian
Replied by Krikor Boghossian on topic Philosophical question - item retrieval/display?
This is more a JavaScript solution. It is plarform independant.
Both these implementations work.

On the first you have to load the modules while on the other one there is nothing there, you load your content via AJAX.
You simply read the content of the link (menu item) and retrieve the content with a JS script.

A vaguely similar concept is Paul Irish's Infinite Scrolling.

PS. Since I do not know the project the same as you do I think you should try both implementation to see which fits you and your project's needs.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 9 years 9 months ago by Krikor Boghossian.

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

  • Brian
  • Brian's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 9 months ago #134946 by Brian
Hi, I saw your reply about Ajax in my other post. Interesting. I have no java experience, but I have a lot of PHP experience and it would be interesting to try this approach, see some examples. Once I saw examples, it would click. But since that will take some time, for now I will stick with the modules. Thanks!

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

More
9 years 9 months ago #134963 by JoomlaWorks
Replied by JoomlaWorks on topic Philosophical question - item retrieval/display?
I believe there are modules that can retrieve same category items in the K2 Extensions Directory or in the Joomla Extensions Directory, under K2's Extensions Category. Have you checked?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Brian
  • Brian's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 9 months ago #134965 by Brian
Hi,

Yeah, but the thing is I am trying to control the display of the items, using tabs and I can't find an extension that would work the way I envision.

Thanks,
Brian

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 9 months ago #134992 by Krikor Boghossian
Replied by Krikor Boghossian on topic Philosophical question - item retrieval/display?
You can manually use tabs in your template overrides.
If your template is Bootstrapped you can use Bootstrap's tabs.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Brian
  • Brian's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 9 months ago #135051 by Brian
Interesting. yes, the template is bootstrapped. Is there a tutorial somewhere that explains how to use the bootstrap functionality? I would be interested to try what you suggest, just need some more info to understand the functionality. Thanks!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 9 months ago #135070 by Krikor Boghossian
Replied by Krikor Boghossian on topic Philosophical question - item retrieval/display?
The template dev can provide some insights in the template's overrides and functionality.

As for Bootstrap you can find more info here: getbootstrap.com/

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum