When Introtext is set to Hidden, it hides the Fulltext also

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Feb 24, 2015 2:34 am
Reply with quote
Report this post
Hi,
here is that problem again. When something is hidden, it hides another option.

Case 1: K2 article has Introtext and Fulltext.
When Introtext is set to hidden it only hides the Introtext. Everything works fine.

Case 1: K2 article has only Fulltext.
When Introtext is set to hidden it only hides the Introtext AND Fulltext. The item is empty.

Here is a link but I'm not sure if you can see anything from it.
http://www.gorast.com/eusnov/mk/krediti ... it-instant

I think there is something wrong with this code:

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


Please help me, the website is about to go live.

Thanks,
Gorast
User avatar
Platinum Boarder

teitbite
Tue Feb 24, 2015 2:34 pm
Reply with quote
Report this post
Hi

Here is a code I took from the clean K2 installation. Please try it:

Code: Select all
     <?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; ?>
User avatar
Moderator

GK User
Tue Feb 24, 2015 3:46 pm
Reply with quote
Report this post
Hi teitbite,
sorry but this doesnt fixed the issue.

Please advise what to do next.

Thanks,
Gorast
User avatar
Platinum Boarder

teitbite
Thu Feb 26, 2015 11:51 am
Reply with quote
Report this post
Hi

But this is the orginal code from component :)

I think I know where Your problem is. Did You know that when there is no "Read more" line in content than all of the text is an introtext ? Please check that and if this is not a case try to explain it to me with examples.
User avatar
Moderator

GK User
Thu Feb 26, 2015 11:56 am
Reply with quote
Report this post
I did not know that. I somehow presumed that if no Read more is present all of the text is Full text :D
This explains it all.

Thanks,
Gorast
User avatar
Platinum Boarder

teitbite
Sat Feb 28, 2015 10:02 am
Reply with quote
Report this post
Hi

Do not worry. I assumed same as You when I was working with K2 for the first time. So I learned it hard way too. Can You use this information to fix the problem so we can close this thread ?
User avatar
Moderator

GK User
Sat Feb 28, 2015 10:54 am
Reply with quote
Report this post
Yes. Case solved, close the thread :D

Thanks,
Gorast
User avatar
Platinum Boarder

teitbite
Wed Mar 04, 2015 10:34 pm
Reply with quote
Report this post
Hi

Thread closed than :) Thank You.
User avatar
Moderator


cron