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


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 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.


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?

Table with Joomla article name in column 1?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Table with Joomla article name in column 1?
#50156
Table with Joomla article name in column 1? 10 Years, 5 Months ago Karma: 0
I would like to make the following table:

Column1: [Joomla article name] - clickable to the article
Column2: Free text- which I fill out manually in the table
Column3: Free text- etc

The table should extend automatically (with the article name in column 1) when I add a new article to Joomla.

Is this possible? I'm not familiar with SQL - so I need help with the query.
The administrator has disabled public write access.
 
#50157
Re:Table with Joomla article name in column 1? 10 Years, 5 Months ago Karma: 760
Hello,

If you want to show articles in a table, use the following SQL query:

Code:


SELECT
 id,
 title
FROM
 #__content
ORDER BY
 created DESC



Set "Columns settings -> ID" parameter to id and "Columns settings -> Hidden" parameter to "Yes". Set also "Columns settings -> ID" to title and "Columns settings -> Format" to the following value:

Code:


<a href="index.php?option=com_content&view=article&id={$columns:id}">{$value}</a>



Regards,
ARI Soft
The administrator has disabled public write access.
 
#50158
Re:Table with Joomla article name in column 1? 10 Years, 5 Months ago Karma: 0
Thanks! It worked fine. But is it possible to choose article titles from articles inside a spesific category, and not all articles?
The administrator has disabled public write access.
 
#50160
Re:Table with Joomla article name in column 1? 10 Years, 5 Months ago Karma: 760
For example if you want to show articles from category with ID = 3, use the following SQL query:

Code:


SELECT
 id,
 title
FROM
 #__content
WHERE
 catid = 3
ORDER BY
 created DESC



Regards,
ARI Soft
The administrator has disabled public write access.
 
#50187
Re:Table with Joomla article name in column 1? 10 Years, 5 Months ago Karma: 0
I also need to query from another Joomla table (Jinfinity Custom Fields). The ARI table should include article name (column 1 - as describes earlier) and Ji Custom Fields in column 2,3,4 etc. Jinfinity gave me the follow code, which I found a bit complicated:

----------------------------------
You will need to query the Ji Custom Fields tables as well.
For example:
// find catid from article
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('catid');
$query->from('#__content');
$query->where('id='.$article_id);
$db->setQuery($query);
$catid = (int) $db->loadResult();

// get field data
$query = $db->getQuery(true);
$query->select('f.*, fv.value');
$query->from('#__jifields AS f');
$query->join('left', '#__jifields_map AS map ON map.fid = f.id');
$query->join('left', '#__jifields_values AS fv ON fv.fid = f.id');
if($catid!=0) $query->where('map.catid = '.(int) $catid);
$query->where('f.title = '.$db->quote($field_title));
$query->where('fv.cid = '.$article_id);
$db->setQuery($query);
$field = $db->loadObject();
------------------------------------------

How would you write this into the ARI plugin?
The administrator has disabled public write access.
 
#50189
Re:Table with Joomla article name in column 1? 10 Years, 5 Months ago Karma: 760
Ask "Jinfinity Custom Fields" support about SQL query (one SQL query, not PHP code which creates two SQL query which they provided) which will return articles from specific category with custom fields from their extension.

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