More News Box

5 posts by 2 authors in: Forums > CMS Builder
Last Post: November 16, 2010   (RSS)

Re: [socanews] More News Box

By Jason - November 16, 2010

Hi,

Can you attach the code so we can see how you're outputting this?

If you're just using ['_link'], edit your section and click on the "Viewer Urls" tab and make sure you're using /articles/ instead of /music/.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] More News Box

By Joseph - November 16, 2010

Hi Jason
this is the code i am using, the more news box was copied from anothe page on the website which is http://www.socanews.com/articles/article.php?Festival-of-de-lights-155

code:
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" bgcolor="#FFFFFF" ><div class="siHeaderBlue">more news</div>
<div align="left">
<?php foreach ($morenews['image'] as $upload): ?>
<img src="<?php echo $upload['urlPath']; ?>" width="190" height="100" style="padding: 5px"/>
<?php break; ?>
<?php endforeach; ?>
<div class="articleContent"><a class="articleContentBold" href="<?php echo $morenews['_link']; ?>"><?php echo $morenews['title']; ?></a><br />
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 4px 0 4px 0;"> </div>
<?php foreach ($morenewsRecords as $key => $morenewsextra): ?>
<?php if ($key == 0): ?><?php continue; ?><?php endif; ?>
<a href="<?php echo $morenewsextra['_link']; ?>" class="articleContentBold"><?php echo $morenewsextra['title']; ?></a><br/>
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 4px 0 4px 0;"> </div>
<?php endforeach; ?>
</div>
</div></td>
</tr>
</table>

Re: [socanews] More News Box

By Jason - November 16, 2010

Hi,

Try changing the code to this:
(changes highlighted in red)

<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" bgcolor="#FFFFFF" ><div class="siHeaderBlue">more news</div>
<div align="left">
<?php foreach ($morenews['image'] as $upload): ?>
<img src="<?php echo $upload['urlPath']; ?>" width="190" height="100" style="padding: 5px"/>
<?php break; ?>
<?php endforeach; ?>
<div class="articleContent"><a class="articleContentBold" href="/articles/<?php echo $morenews['_link']; ?>"><?php echo $morenews['title']; ?></a><br />
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 4px 0 4px 0;"> </div>
<?php foreach ($morenewsRecords as $key => $morenewsextra): ?>
<?php if ($key == 0): ?><?php continue; ?><?php endif; ?>
<a href="/articles/<?php echo $morenewsextra['_link']; ?>" class="articleContentBold"><?php echo $morenewsextra['title']; ?></a><br/>
<div style="background-color: #C0DEED; height: 1px; width: 100%; margin: 4px 0 4px 0;"> </div>
<?php endforeach; ?>
</div>
</div></td>
</tr>
</table>


That way these links will always redirect to the /articles/ folder.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] More News Box

By Joseph - November 16, 2010

Thanks Jason that works fine.