PDA

View Full Version : Redirection Links


berto
10-13-2007, 03:13 PM
For some reason the redirection link option for categories does not seem to be working? I entered a URL but it still redirects to category on the site instead of the external link provided.

Also article redirection links, is there now way it can directly link the headline to an external source instead of having this little box appear. It is rather confusing because you would tend to click on the article headline not the box :eek:

utvara
10-16-2007, 09:23 AM
Box sections direct redirect template:

<vte:if test="{VIVVO_MODULES_SECTIONS}">
<div id="box_sections" class="box">
<div class="box_title"><span><vte:value select="{LNG_SECTIONS}" /></span></div>
<div class="box_body">
<vte:box module="box_sections">
<vte:params>
<vte:param name="id" value="0" />
</vte:params>
<vte:template>
<ul>
<vte:foreach item = "category" from = "{categories}">
<vte:if test="{category.view_subcat}">
<li>
<vte:if test="!{category.redirect}">
<a href="{category.get_href}">
<vte:value select="{category.category_name}" />
</a>
<vte:else>
<a href="{category.get_redirect}">
<vte:value select="{category.category_name}" />
</a>
</vte:else>
</vte:if>
<vte:if test="{category.subcategories}">
<vte:box module="box_sections">
<vte:params>
<vte:param name="id" value="{category.id}" />
<vte:param name="prefix" value="" />
</vte:params>
<vte:template>
<ul>
<vte:foreach item = "category" from = "{categories}">
<vte:if test="{category.view_subcat}">
<li>
<a href="{category.get_href}">
›<vte:value select="{prefix}" />
<vte:value select="{category.category_name}" />
</a>
<vte:if test="{category.subcategories}">
<vte:load module="box_sections" id="{category.id}" template_string="{template_string}" prefix="›{prefix}" />
</vte:if>
</li>
</vte:if>
</vte:foreach>
</ul>
</vte:template>
</vte:box>
</vte:if>
</li>
</vte:if>
</vte:foreach>
</ul>
</vte:template>
</vte:box></div>
</div>
</vte:if>

Notice this part

<vte:if test="!{category.redirect}">
<a href="{category.get_href}">
<vte:value select="{category.category_name}" />
</a>
<vte:else>
<a href="{category.get_redirect}">
<vte:value select="{category.category_name}" />
</a>
</vte:else>
</vte:if>

Article summary example with direct redirect on title:

<vte:template>
<div class="short">
<div class="short_holder">
<vte:if test="{article.image}">
<div class="image">
<vte:if test="!{article.get_link}">
<a href="{article.get_href}"><img src="{VIVVO_URL}thumbnail.php?file={article.get_image}&amp; size=summary_medium" alt="image" /><br /></a>
<vte:else>
<a class="visit" href="{article.get_link}"><img src="{VIVVO_URL}thumbnail.php?file={article.get_image}&amp; size=summary_medium" alt="image" /><br /></a>
</vte:else>
</vte:if>
</div>
</vte:if>
<h2>
<vte:if test="!{article.get_link}">
<a href="{article.get_href}"><vte:value select="{article.get_title}" /></a>
<vte:else>
<a class="visit" href="{article.get_link}"><vte:value select="{article.get_title}" /></a>
</vte:else>
</vte:if>
</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>

berto
10-16-2007, 09:17 PM
Thumbs up to you my friend. It was all about {article.get_link} for me :)

Thanks Utvara

aditya
10-18-2007, 08:25 PM
Thank you for the advise.

But how can we change the "Redirect URL" of "Articles" in RSS feeds?

Saboteur
11-14-2007, 01:49 PM
It is possible to add an example with a redirect from a subcategory? Please.