Jump to content

Recommended Posts

Posted

Hi everone.

I've searched the forum to find a solution to my problem, but so far nothing did the trick for me. So here's the issue:

I've created a repeater called "news" and it's used on several overview pages (working perfectly).

Now, on the home page, I want to show the latest 10 news, and I figured you can do this like this:

<? foreach($pages->find("template=repeater_news, sort=-modified, limit=10") as $news): ?>
                <li><a href="<?php echo $news->getForpage()->url ?>"><img src="<?php echo $news->getForpage()->icon->url ?>"><span><?php echo $news->text_primary ?></span><br><?php echo $news->getForpage()->title ?> - <?php echo date('d/m/Y g:i a', $news->modified) ?></a></li>
<? endforeach; ?>

That works fine on my localhost, but as soon as I access the page via IP (like externally), the list stays empty.

The same problem happens on my search page (when searching news).

"Normal" pages don't seem to have the problem.

Can anybody help me?

Cheers and thanks

Posted

If your testing with a different server online, it could also be, that this causes the problems: "<? foreach …", you have to use "<?php ".

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...