Keyword

[SOLVED] Fulltext will not render on item layout

  • 3by400
  • 3by400's Avatar Topic Author
  • Offline
  • New Member
More
10 years 19 hours ago - 9 years 8 months ago #132557 by 3by400
We are having an issue where the fulltext of an item will not display on the item layout. It will render on the category item layout and I have verified that there is in fact fulltext present in the K2 item(s).

Link to page with issue - membersonlysupplements.com/index.php?option=com_k2&view=item&id=4:busting-creatine-myths-wide-open&Itemid=349

The introtext only is currently displaying even though the k2 default template's item.php indicates fulltext should display.

Here is the category item layout where I've forced fulltext for a demonstration in category_item.php - membersonlysupplements.com/index.php?option=com_k2&view=itemlist&layout=category&task=&id=&Itemid=349#.VC2zlOe0afm
Last edit: 9 years 8 months ago by 3by400. Reason: SOLVED

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 4 hours ago #132558 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Fulltext will not render on item layout
Have you made any template overrides?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • 3by400
  • 3by400's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 hours ago #132559 by 3by400
Replied by 3by400 on topic Re: Fulltext will not render on item layout
No, there is no /my_template/html/com_k2 folder at all. We are also using the default k2 template.

Please Log in or Create an account to join the conversation.

More
10 years 2 hours ago #132560 by Lefteris
Replied by Lefteris on topic Re: Fulltext will not render on item layout
@3by400

Looking at your page source it looks like you have entered the whole text into introtext and then you have entered just a paragraph into fulltext. Edit the item and fix it's contents. Click the "Read more" button on the point you want to split your text. Then go to the categories settings and tell K2 to show introtext in category listing and show both introtext and full text in item page.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • 3by400
  • 3by400's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago - 9 years 11 months ago #132561 by 3by400
Replied by 3by400 on topic Re: Fulltext will not render on item layout
Actually, that is not the case. I do have text in both introtext and fulltext. I'm using separate editor boxes. The text that shows on the item layout is in the introtext box.

I believe what you are seeing is my forced fulltext on the category layout, that I just placed there to demonstrate that fulltext does actually exist in category_item.php.

See screenshot of textboxes....


Update

Also, I have verified this: the item is inheriting the item view from the category and the category is set to show both introtext and fulltext on the item layout view. I also at one point tried to force the fulltext in item.php and the fullltext still would not render.

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #132562 by Lefteris
Replied by Lefteris on topic Re: Fulltext will not render on item layout
@3by400

Both items on that page are only displaying the fulltext in the item page. Check again the category settings.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • 3by400
  • 3by400's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago - 9 years 11 months ago #132563 by 3by400
Replied by 3by400 on topic Re: Fulltext will not render on item layout
I beg your pardon, but no they are not. As I've stated I modified category_item.php just to show you for the purpose of this thread that there is in fact fulltext for these items and it renders correctly on the category view ... but it will not render on the item view - this is the issue. The category view is not the issue.

I realize that on the category view all text is in the div with class "catItemIntroText", but that is only because I'm forcing the fulltext in category_item.php within that div temporarily.

The item pages are the issue - membersonlysupplements.com/index.php?option=com_k2&view=item&id=4:busting-creatine-myths-wide-open&Itemid=349

The fulltext will not render on the item page. I attached a screenshot in my previous post to prove that there is text in both the introtext box and in the fulltext box when editing the item. This is the introtext for that item:

"You’re probably curious as to whether or not it’s safe for you, mainly because it’s surrounded by misconceptions, myths, and even a few anatomy-related horror stories.
Gym goers may have heard of the word CREATINE being thrown around casually in the gym. One might think that it’s an illegal substance like steroids or something like a performance enhancing drug. You’re also probably curious as to whether or not it’s safe for you, mainly because it’s surrounded by misconceptions, myths, and even a few anatomy-related horror stories.
Let’s crack these myths wide open, shall we?"

Update

I also realize that the content on the item page is wrapped in a div with class "itemFullText" but the text showing is only the text in the introtext box. That is the problem.

Even when I modified item.php and added <?php echo $this->item->fulltext; ?> outside of the if/else the fulltext would still not display on the item page.

Please Log in or Create an account to join the conversation.

  • 3by400
  • 3by400's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago #132564 by 3by400
Replied by 3by400 on topic Re: Fulltext will not render on item layout
This is the if/else statement as it appears in item.php. The 'else' is what is happening on the item page:

<?php if(!empty($this->item->fulltext)): ?>
<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<div class="itemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemFullText')): ?>
<!-- Item fulltext -->
<div class="itemFullText">
<?php echo $this->item->fulltext; ?>
</div>
<?php endif; ?>
<?php else: ?>
<!-- Item text -->
<div class="itemFullText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>


No matter what I do <?php echo $this->item->fulltext; ?> will not render on the item page, even if I place it somewhere before or after this if/else.

Please Log in or Create an account to join the conversation.

  • 3by400
  • 3by400's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago #132565 by 3by400
Replied by 3by400 on topic Re: Fulltext will not render on item layout
I've re-verified that the categories have both introtext and fulltext set to "show" for the item view.

Any other ideas for what might be happening?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 11 months ago #132566 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Fulltext will not render on item layout
<?php if($this->item->params->get('itemIntroText')): ?> 
<!-- Item introtext --> 
<div class="itemIntroText"> 
<?php echo $this->item->introtext; ?> 
</div> 
<?php endif; ?> 

<?php if($this->item->params->get('itemFullText')): ?> 
<!-- Item fulltext --> 
<div class="itemFullText"> 
<?php echo $this->item->fulltext; ?> 
</div> 
<?php endif; ?> 

Could you replace the code you sent us with this?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum