Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Data Driven Tabs
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Data Driven Tabs
#58502
Data Driven Tabs 7 Years, 7 Months ago Karma: 0
Hi
I'm sorry but some of this will be going over old ground, but I've ill for about a year and I've forgotten everything I learnt last year.
I wish to create a tabbed page from a database table and I'm afraid that even after studying the help file and the forum I can't figure it out.

What I want is a tabbed page. Each tab will have the Tab Heading some text then the items from a table and then a footer.
One tab with not have any items, just the header and footer.

1) Is it just one table one uses to provide all the data for the page or two tables one for the tab, header and footer and one for items.

You can see what I'm trying to replace at
www.gryphonsd.co.uk/useful-links/primary-resources
and
www.gryphonsd.co.uk/component/anesfhs/?task=publications&Itemid=203

They both in pure Joomla and I want them to be table driven.
I got this working with your help 18 months ago but I lost all when the drive fried.
While trying to get this going I did define a connection and query but when I try to create a new tabbed I get the choice of a Joomla Articles or K2 Articles (K2 is not installed) trying to create a data table I and I get Database Queries but the it finds none.
Cheer
Niall
The administrator has disabled public write access.
 
#58503
Re:Data Driven Tabs 7 Years, 7 Months ago Karma: 747
Hello,

If you want to create tabs based on data from a database, "ARI Smart Content - Tabs" plugin can be used for this purpose. Create a database source on "ARI Smart Content -> Data -> Database data -> SQL queries" page and use the following plugin code:

Code:


{tabs source="5"}
{/tabs}



Specify ID of data source in "source" parameter.

For example if the following query is defined in the data source:

[code
SELECT
id,
title,
introtext,
created
FROM
#__content
[/code]

The following plugin code can be used:

Code:


{tabs source="5" titleTemplate="{$title} [{$created}]" itemTemplate="{$introtext}"}
{/tabs}




Regards,
ARI Soft
The administrator has disabled public write access.
 
#58694
Re:Data Driven Tabs 7 Years, 6 Months ago Karma: 0
Hi
Thanks that works fine now I would like to extend that.

I want to show a categorised list of Links
I have two queries.

#4 = SELECT t_id,t_title, t_note1, t_note2 from #__gsd_tabs
#5 = SELECT t_id, l_title, l_url, l_extra from #__gsd_links.


{tabs source="4"
titleTemplate="{$t_title}" itemTemplate ="{$t_note1"}}
{/tabs}

Shows a a tabset with t_note1 as the text

However I would like to have as the data of each tab page to be as follows
_________________________________________________________________________
#4. t_title

#4.t_note1

List of records from #5 as list items

aref (#5.t_tItle, #5.t_url) #5.t_extra

end of list
#4.t_note2
___________________________________________________________________________

How do I acheive that?
Thanks
Niall
The administrator has disabled public write access.
 
#58697
Re:Data Driven Tabs 7 Years, 6 Months ago Karma: 747
Hello,

Is any relation between #__gsd_tabs and #__gsd_links tables are defined in database (for example they can be joined by t_id field or another fields(s))?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58701
Re:Data Driven Tabs 7 Years, 6 Months ago Karma: 0
Hi

Yes, I forgot to mention that they are joined via t_id.

Cheers
Niall
The administrator has disabled public write access.
 
#58705
Re:Data Driven Tabs 7 Years, 6 Months ago Karma: 747
Use JOIN to create only one SQL query. It will look like:

Code:


SELECT
 T.t_id,
 T.t_title,
 T.t_note1,
 T.t_note2,
 L.l_title,
 L.l_url,
 L.l_extra
FROM
 #__gsd_tabs T INNER JOIN #__gsd_links L
   ON T.t_id = L.t_id



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1