Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support How to display both {summary} and {article} in same template
Gebeer
Posted on 06 May 2011, 10:46:38

Access: Member
Total Posts: 9
Joined: 2010-02-09

Hi,

from post #2569 I learned:
Quote:
When not viewing a single news article the {article} section will be displayed for all news posts unless they also have a {summary}, if they have a summary then the summary will be displayed.

Now I have this template where I need to show both, summary and article content because I use the summary field to insert an image that shows to the left of title and article of the news. Here's my template:
Code:
<div id="projekt">
<div id="cprojr" class="float_right" class="bgwhite">
<h6>{title}</h6>
<p>{article}</p>
</div>
<div id="cprojl"><a href="img/projekte/Aktuell-04.jpg" rel="lightbox">{summary}</a></div>
</div>

Is there a way to tweak the script in order to show both, summary and article content? This would be much appreciated because I don't see an other way to achieve my layout. This can be seen at http://he-architektur.de/projekte.php, first entry at top.

Thanks
gerhard
#3453
Gebeer
Posted on 06 May 2011, 13:14:09

Access: Member
Total Posts: 9
Joined: 2010-02-09

Solved :smile2:

I found the part of code in functions.php that is responsible for hiding the {article} content when both {article} and {summary} are used in the same template.
It is on lines 580 and 581:
Code:
 
$str = str_replace("{story}","",$str);
$str = str_replace("{article}","",$str);


I replaced it with
Code:
 
$str = str_replace("{story}",bbcode($row['story'],$usehtml, $row['old']),$str);    
$str = str_replace("{article}",bbcode($row['story'],$usehtml, $row['old']),$str);


Now both, the summary text and the article text are also shown when not viewing a single news article.

Hope this helps someone who runs into the same issue

Cheers
gerhard
#3454
Network-13.com © 2013