Page 1 of 1
News Summary - Text but no image
Posted: Fri Apr 13, 2012 11:37 am
by katea
Hi,
I need for the newssumary to import the paragraph text from the newsdetail page but not the image or images displayed in the news detail article.
So, if in the NewsDetailContent I have:
<img src="" ....etc</img>
<p>Some text .....</p>
I just want the NewsSummary to import the <p> and not the <img>
Can anyone help me please?
Thanks
Re: News Summary - Text but no image
Posted: Fri Apr 13, 2012 7:19 pm
by Dr.CSS
There is no "import", you can just copy the part of Detail you want into the summary edit box...
Re: News Summary - Text but no image
Posted: Fri Apr 13, 2012 10:45 pm
by katea
I don't see a way of doing that.
It just says
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
The image is part of the content and shows in the summary.
I don't want to add a summary, I just want it to take it from the content, as that way it automatically decides if it should have a more link, where it doesn't if you add a summary.
I just want the text from the detail to display and not the detail image ...
Re: News Summary - Text but no image
Posted: Fri Apr 13, 2012 11:01 pm
by Dr.CSS
The way it works is...
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
So it looks in the summary field and if anything in it make a summary with a more link, if not then just show the content/detail field, I don't know what else to tell you as there is no way to auto fill the summary field from what is in the content/detail field...
If you don't see a Summary edit box someone turned it off in the News Options tab...
Hide the summary field when adding or editing articles:
Re: News Summary - Text but no image
Posted: Fri Apr 13, 2012 11:39 pm
by katea
Everything works as you say and I do get a summary field.
It's just that the images I'm putting into the detail ... Bearing in mind I'm aligning them left, are being brought up and used in the summary.
When I use the summary box, and just add say 2 words, or 20, it's always showing a more link, regardless of the content. Truncate doesn't even seem to work.
The summary is pulling the left aligned image into the summary, which of course is useless unless I'm adding it as a field to display a thumb also.
Just seems strange.
Re: News Summary - Text but no image
Posted: Fri Apr 13, 2012 11:55 pm
by Dr.CSS
If you don't put anything in the Summary it will show
ALL of the content in the Detail edit box as it should...
The summary is pulling the left aligned image into the summary
No way, sorry, if the image is in the
Detail edit box and you don't have anything in the
Summary edit box it is going to show the Detail content not Summary content...
Re: News Summary - Text but no image
Posted: Sat Apr 14, 2012 12:22 am
by katea
That's why I was asking if I could strip the <img> tag from it.
I've done it with CSS with a display none, so there must be a way you can do it internally ... An exclude or something?
Re: News Summary - Text but no image
Posted: Sat Apr 14, 2012 6:25 am
by staartmees
put in the Summary only text and put in the Detail text with images, and remove the Summary from the article template.