(2012-04-14, 19:42:59)Carlos Wrote: A way to have a one-page site with anchors (for GS 3.1):
Insert this code in your template (e.g. before, after, or instead of the <?php get_content(); ?> tag).
Code:<?php
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
foreach ($pagesSorted as $page) if ($page['url']!='index' && $page['menuStatus']=='Y') {
$pag = $page['url'];
?>
<a name="<?php echo $pag; ?>"></a>
<div class="pagecontent <?php echo $pag; ?>">
<h2><?php getPageField($pag,'title'); ?></h2>
<?php getPageContent($pag); ?>
</div>
<?php } ?>
Thank you, this saved me
In my single page site I also need a redirect to external site for a couple of link, so my question is:
there is a way to add the function for checking if the keywords field on the page is empty or not? if is empty the variable ?pag is = to slug url , if is filled (with the url I need) the variable $pag is = at the content of the field
sorry for my bad english