簡體   English   中英

com_ajax從類別joomla獲取文章

[英]com_ajax get articles from category joomla

我正在使用com_ajax從某個類別中獲取文章,我嘗試調用

index.php?option=com_ajax&format=json&module=mod_articles_category&id=113

但是它返回以下結果,

{"success":false,"message":"Module mod_mod_articles_category is not 
published, you do not have access to it, or it's not assigned to the 
current menu item.","messages":null,"data":null}

是否可以使用com_ajax獲取數據?

似乎您只需要傳遞不帶'mod_'前綴的模塊。

根據文檔,這應該起作用:

index.php?option = com_ajax&format = json&module = articles_category&id = 113

我想它會為您添加前綴,因此您最終會得到mod_mod_

另外,您還需要確保將模塊發布到菜單項中,並且您有權訪問該模塊等

因此,您應該可以嘗試使用com_ajax獲取數據。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM