It's very strange but I haven't found a really good solution by googling joomla style intro text
.
I want that the current output:
<div class="item-content">
<p>Intro Text</p>
<p>Full Text</p>
</div>
to be replaced by:
<div class="item-content">
<div class="introtext"><p>Intro Text</p></div>
<div class="fulltext"><p>Full Text</p></div>
</div>
I was sure that Joomla itself should have declared such a class for introtext or at least should have a configurable option for that.
What I do NOT want:
- A Joomla 1.x or Joomla 1.5 solution
- A manual way until there is not an extension-base solution (which is more more strange!)
UPDATE after {THIS} answer
Now I have a problem with $this->item->introtext
, $this->item->fulltext
and $this->item->text
.
I expect $this->item->introtext
to show ONLY introtext, but it also contains the contents AFTER READ MORE.
What property should I use to only include contents BEFORE READ MORE, not anything else?
I don't expect that the $this->item->introtext
content be affected by Show Intro Text
parameter in article options. It is expected that only $this->item->text
cares about it. Am I right?
Note: $this->item->fulltext
works as expected and outputs only the contents AFTER the READ MORE.
In case of disabling Show Intro Text
parameter in article options, all of the 3 variables, return the text after READ MORE. This should really be considered as a bug.
It would be more wisely to have a variable to return only intro text (in any situation), a variable to return only full text (in any situation), and a variable to include/exclude introtext according to the article parameter: Show Intro Text
$ftext = JHTML::_('content.prepare', $this->item->fulltext); echo $ftext;
– Lustrate