I am writing a module to allow admins to select upto 3 different articles (taken from Joomla Content) to show in the frontend of a site.
I want to show the article title and the intro image, along with a link on both of them to the article.
I have written the following in the module XML file, which shows the article list in the module backend:
<fields name="params">
<fieldset name="basic">
<field
name="article_title_1"
type="sql"
default="10"
label="Select an article"
query="SELECT id, title FROM #__content"
value_field="title">
<option value="">Please select your option</option>
</field>
</fieldset>
</fields>
But in my default.php file, when I use the following
<?php echo $params->get('article_title_1') ; ?>
This only shows the article ID, and not the title.