- Posts: 30
COMMUNITY FORUM
Fulltext div is actually getting introtext?
- shenkwen
- Topic Author
- Offline
- Junior Member
Less
More
12 years 9 months ago #60943
by shenkwen
Fulltext div is actually getting introtext? was created by shenkwen
Code from item.php:
<!-- 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>
<!-- 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>
Please Log in or Create an account to join the conversation.
- Jakub Jedynak
- Offline
- Senior Member
Less
More
- Posts: 56
12 years 9 months ago #60944
by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Fulltext div is actually getting introtext?
So what's the problem?
The code above says:
"If you find in database Introtext AND Fulltext, display Introtext in its own Introtext-DIV, AND then Fulltext in Fulltext-DIV. But if Fulltext is empty then show Introtext in Fulltext-Div instead of Intro-DIV"
The code above says:
"If you find in database Introtext AND Fulltext, display Introtext in its own Introtext-DIV, AND then Fulltext in Fulltext-DIV. But if Fulltext is empty then show Introtext in Fulltext-Div instead of Intro-DIV"
Please Log in or Create an account to join the conversation.
- shenkwen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
12 years 8 months ago #60945
by shenkwen
Replied by shenkwen on topic Re: Fulltext div is actually getting introtext?
ok. I understand you. The problem is about the definition of fulltext and introtext though.
if we insert readmore button into an article, then the text about it is intro, and below it fulltext, that is fine;
but if there is no readmore button, k2 will consider the text as introtext, which I think is bad. It is supposed to be fulltext in my opinion, cause people don't always want introtext, while fulltext is always needed.
if we insert readmore button into an article, then the text about it is intro, and below it fulltext, that is fine;
but if there is no readmore button, k2 will consider the text as introtext, which I think is bad. It is supposed to be fulltext in my opinion, cause people don't always want introtext, while fulltext is always needed.
Please Log in or Create an account to join the conversation.
- Jakub Jedynak
- Offline
- Senior Member
Less
More
- Posts: 56
12 years 7 months ago #60946
by Jakub Jedynak
Replied by Jakub Jedynak on topic Re: Fulltext div is actually getting introtext?
No, it's a good Idea.
If you have article without 'full' part, on the category view and article view it is treated as an '(full) article' (no 'read more' button on category view) - you have only 'intro' part, no 'full' part.
If you have 'intro' and 'full' on the category view only 'intro' is displayed. And on the article view intro is displayed as and 'intro', and full part is displayed as full' part.
If you choose not to display 'intro' in article view, you'll get 'intro' displayed for items that don't have 'full' part.
I think that the problem for you is name of those parts: 'intro' and 'full' - think of it as 'article' and 'article extended version' and it should be easier to get the idea. If you edit item in two separate windows for 'intro' and ' full' text you may be confused with 'intro' and 'full' parts, but when you switch to one window editing it's much understandable why it works that way.
If you have article without 'full' part, on the category view and article view it is treated as an '(full) article' (no 'read more' button on category view) - you have only 'intro' part, no 'full' part.
If you have 'intro' and 'full' on the category view only 'intro' is displayed. And on the article view intro is displayed as and 'intro', and full part is displayed as full' part.
If you choose not to display 'intro' in article view, you'll get 'intro' displayed for items that don't have 'full' part.
I think that the problem for you is name of those parts: 'intro' and 'full' - think of it as 'article' and 'article extended version' and it should be easier to get the idea. If you edit item in two separate windows for 'intro' and ' full' text you may be confused with 'intro' and 'full' parts, but when you switch to one window editing it's much understandable why it works that way.
Please Log in or Create an account to join the conversation.