I want to get article text by passing article ID from the joomla template.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
try this technique:
Get article text by article ID in Joomla 2.5 (3 will work also according docs) plugins:
And article id is got from component/plugin parameters for example:
From inside own component:
From other component:
Get Module Parameter from template's php file:
Simple, providing you sending an article id with post/get and using variable "id" as its number:
EDIT: to get articleId from anywhere:
Joomla has the default script for getting content from sql table.
Here article (#__content)
To Get Article Id:
To get Article content: