PDA

View Full Version : how to add a html link in the abstact text


ashwelljames
01-03-2008, 09:34 PM
hi is there a way to add a text link to the abstract text as i would like to make short text articles with no main text and link to a new site from it

Micha
01-04-2008, 09:54 AM
Well you could do something like this:

For most short articles (summaries) templates are located in templates\xhtml\summary folder.

Now, to accomplish what you need, you must change all href's to go to external source.

For example, default.tpl template for summary:

<vte:template>
<div class="short">
<div class="short_holder">
<vte:if test="{article.image}">
<div class="image">
<a href="{article.get_href}"><img src="{VIVVO_URL}thumbnail.php?file={article.get_image}&amp; size=summary_medium" alt="image" /><br /></a>
</div>
</vte:if>
<h2><a href="{article.get_href}"><vte:value select="{article.get_title}" /></a></h2>
<span class="summary"><vte:value select="{article.get_summary}" /></span><vte:if test="{article.body}">...</vte:if>
<div class="article_link">
<vte:if test="!{article.get_link}">
<vte:if test="{article.body}">
<a href="{article.get_href}"> <vte:value select="{LNG_FULL_STORY}" /></a>
</vte:if>
<vte:else>
<a class="visit" href="{article.get_link}"><img src="{VIVVO_THEME}img/external.png" alt="{LNG_VISIT_WEBSITE}"/></a>
</vte:else>
</vte:if>
</div>
</div>
</div>
</vte:template>

Here you need to replace <a href="{article.get_href}"> with <a href="{article.get_link}">.

Now you can add your articles with short summary, and type your URL in "Link" field on the left side in Options type, and that way you'll have short article with external link on title and after short text.

Hope It helps.