Jump to content

how to redirect fields


ildarvasin
 Share

Recommended Posts

In you home template, you could do something like:

<?php
	$newsArticles = $pages->find('template=your_news_templates');
	foreach ($newsArticles as $newsArticle) {
		echo "<a href=\"" . $newsArticle->url . "\">" . $newsArticle->title . "</a>";
	}
?>

This would output each article's title (as well as a url to the article). Obviously you can change the markup to whatever you would need.

  • Like 3
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...