I want to dump tags by order from the #__tags database table, but there is no order column in the structure, though there is ordering capability in the tags component.
I've viewed the relevant files from com_tags in reference to ordering, but I have not been able to define the logic to apply to my query statement.
SELECT p.alias,p.title,t.title AS tagname
FROM #__content p,#__tags t,#__contentitem_tag_map m
WHERE m.tag_id = t.id
AND m.content_item_id = p.id
AND p.catid = 27
ORDER BY t.tagorder ASC //this column not included in table
I don't see any column that handles ordering. How can I get the ordering as arranged in the component's tags view page?
JOIN ... ON
syntax. What kind of special ordering do you want? Are you not happy to useusort()
in php?usort()
would be fine if I had given values to work from. None of the columns of the#__tags
table are applicable since they do not represent the sorted order as displayed in the HTML view in the admin table. I need to pass the sorted output to a file in the admin template, and able to have that data rearrange dynamically when I change the tags' sort order. The file is not for distribution, so the "old-school comma-joins" will suffice. If you prefer it rewritten for this forum, I'll do so.