Removing an entry from list view

5 posts by 4 authors in: Forums > CMS Builder
Last Post: September 27, 2010   (RSS)

By drewh01 - December 12, 2009 - edited: December 12, 2009

I have a entry (summaries) in my list view that I need to remove from the main body content as it is displaying a large gap at the top of the page, however I still need it to remain as a link under the sub nav for "articles". "Summaries" is the first article on this page.

http://65.99.232.147/articles/articles.php

How can I do this?

----
Here is the "articles" page code:



<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php

require_once "/home/thesanct/public_html/cmsAdmin/lib/viewer_functions.php";

list($articlesRecords, $articlesMetaData) = getRecords(array(
'tableName' => 'articles',
'perPage' => '10',
));

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Articles :: The Sanctuary at Sedona</title>
<meta name="Description" content="Articles :: The Sanctuary at Sedona" />
<!--<meta name="Keywords" content="<?php echo $articlesRecord['metakeywords'] ?>" /> -->
<link href="../style.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='../quickmenu.js'></script>

</head>

<body>

<div id="wrapper">

<div id="header"><?php include("../flash.php"); ?></div>
<!-- end header -->

<div id="nav">

<?php include("../top-nav.php"); ?>

</div><!--end div nav-->


<div id="content">

<?php foreach ($articlesRecords as $record): ?>


<table width="760" height="200" border="0" cellspacing="0">
<tr>
<td width="558" height="200">

<h1><?php echo $record['name'] ?></h1>
<?php echo $record['content'] ?><?php if ($record['additional_content']): ?>[<a href="<?php echo $record['../_link'] ?>">read more</a>]<br/>
<?php endif ?></td>
</tr>
</table>


<hr />
<?php endforeach; ?>

<!-- STEP3: Display Page Links (Paste anywhere below "Load Record List") -->
<?php if ($articlesMetaData['prevPage']): ?>
<a href="<?php echo $articlesMetaData['prevPageLink'] ?>">&lt;&lt; prev</a>
<?php else: ?>
&lt;&lt; prev
<?php endif ?>

- page <?php echo $articlesMetaData['page'] ?> of <?php echo $articlesMetaData['totalPages'] ?> -

<?php if ($articlesMetaData['nextPage']): ?>
<a href="<?php echo $articlesMetaData['nextPageLink'] ?>">next &gt;&gt;</a>
<?php else: ?>
next &gt;&gt;
<?php endif ?>
<!-- /STEP3: Display Page Links -->

</div><!-- end content -->
<!-- end content -->
<div id="clear"></div><!-- end clear -->

<div id="footer">
<?php include("../footer-nav.php"); ?>
</div><!-- end footer -->

</div><!-- end wrapper -->
<?php include("../copyright.php"); ?>
</body>
</html>

Re: [drewh01] Removing an entry from list view

By Dave - December 15, 2009

Hi Drew,

Is the content field for Summaries blank? If so you can use this code to skip it:

<?php foreach ($articlesRecords as $record): ?>
<?php if (!$record['content']) { continue; } // skip articles with no content ?>


Let me know if that works for you! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Removing an entry from list view

Thanks!

Re: [zickey] Removing an entry from list view

By Jason - September 27, 2010

Hi,

Is the does the name field of that category hold the value "many flavors to choose from" ?

If so, you could filter it out based on that text:

<?php foreach ($jellybeanflavorsRecords as $record): ?>
<?php if (!$record['name'] || $record['name']=="many flavors to choose from") { continue; } // skip many flavors to choose from ?>


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/