Welcome, Guest
Username: Password: Remember me
Pleas keep in mind that SPAM will be deleted instantly
  • Page:
  • 1

TOPIC:

Output from 2 different tables on one page ? 5 years 3 months ago #3958

  • sackbut
  • sackbut's Avatar Topic Author
  • Offline
  • Posts: 32
  • Thank you received: 5
Here is my problem, explained by example:

Table "Committee Meetings". Need to put next meeting on home page. So sort table by Date Column ( unix time) and pick one off the top. Easy

Table "Outside Visits". Need to put next visit on home page, using same method. ??

Is this possible ? Don't need code, just a hint oh how to proceed if it can be done.

Anyone got any ideas ?

Thanks

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

Output from 2 different tables on one page ? 5 years 3 months ago #3961

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1185
  • Karma: 21
  • Thank you received: 224
You could use a plugin to display single entries manually or better two modules and order by event_date descending.

But the problem is that you want the next dates. So normally you want
to sort from event date_ascending but only the upcoming events.

So maybe you should use a modified mod_joodb.php.
Replace the attached file with /modules/mod_joodb/mod_joodb.php

Two hints:
1:) You can override, modify the module output in your template. But that requires programming!
2:) You can use the joomla load module plugin to display modules in content articles.

btw: you shouldn't use timestamp as event date use mysql date.

This message has an attachment file.
Please log in or register to see it.

The following user(s) said Thank You: sackbut

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

Output from 2 different tables on one page ? 5 years 3 months ago #3964

  • sackbut
  • sackbut's Avatar Topic Author
  • Offline
  • Posts: 32
  • Thank you received: 5
OK - thanks for that. I just wrote my own module which will do this. I wasn't aware of {loadmodule} so thanks for that hint - I tried it and it works OK with my little module.

I looked at the controller code you sent and it's interesting - I can modify that for all sorts of things, I'm sure, which I can then incorporate into jooDB. Should be able to do the formatting I have just posted a question about ( formatting numbers ) for example. Time to experiment

Thanks

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

  • Page:
  • 1
Moderators: Dirkjoest