necm1
Member
- Jan 27, 2014
- 111
- 16
Good day dear community, I currently have a small problem. I always get the following error message: Notice: Undefined variable: index in C: \ xampp \ htdocs \ tpl \ ghost \ index.tpl.php on line 51
I use the template system of Quckstar. I have in my index.php the following code:
And in my index.tpl.php (line 51):
TPL System:
Where is the mistake? : S
EDIT: Funny, the define BLOG_SITENAME he gets from the config. : S
I use the template system of Quckstar. I have in my index.php the following code:
Code:
<?php
/**
* @author Madly
* @copyright 2014
*/
include("config.php");
//Index Template laden
$tpl->page("index");
$tpl->display();
$index = new Main($mysqli);
?>
And in my index.tpl.php (line 51):
Code:
<?php
foreach($index->getAllNews("2") as $n) {
?>
<article class="post tag">
<header class="post-header">
<h2 class="post-title"><a href="/post/<?php echo $n['postID']; ?>"><?php echo $n['postTitle']; ?></a></h2>
<section class="post-meta">
<img class="author-img" src="<?php echo $n['postAuthorImage']; ?>" alt="Author image"/>
<span class="author-name"><?php echo $n['postAuthor']; ?></span>
•
<time datetime="<?php echo date("d M Y", $n['postDate']); ?>"><?php echo date("d M Y", $n['postDate']); ?></time>
</section>
</header>
<section class="post-excerpt">
<?php echo $n['postShortText']; ?>
</section>
<footer class="more-links">
<a class="read-more button-save" href="/post/<?php echo $n['postID']; ?>">Weiterlesen</a>
</footer>
</article>
<?php } ?>
TPL System:
You must be registered for see links
Where is the mistake? : S
EDIT: Funny, the define BLOG_SITENAME he gets from the config. : S