mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
fix getRelativeUrl()
This commit is contained in:
parent
a285030619
commit
191213a820
4 changed files with 7 additions and 7 deletions
|
@ -110,7 +110,7 @@ class Post
|
||||||
|
|
||||||
public function getRelativeUrl()
|
public function getRelativeUrl()
|
||||||
{
|
{
|
||||||
return $this->postType . '/' . $this->slug;
|
return '/' . $this->postType . '/' . $this->slug;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSlug()
|
public function getSlug()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<h3>Latest News</h3>
|
<h3>Latest News</h3>
|
||||||
<ul class="no-style">
|
<ul class="no-style">
|
||||||
<?php foreach($posts as $post): ?>
|
<?php foreach($posts as $post): ?>
|
||||||
<li><a href="<?php echo '/'.$post->getRelativeUrl() ?>"><?php echo $post->getTitle() ?></a></li>
|
<li><a href="<?php echo $post->getRelativeUrl() ?>"><?php echo $post->getTitle() ?></a></li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="prev span6">
|
<div class="prev span6">
|
||||||
<?php if ($prevPost = $post->getPrevPost()): ?>
|
<?php if ($prevPost = $post->getPrevPost()): ?>
|
||||||
<div class="prev-next-label">
|
<div class="prev-next-label">
|
||||||
<a href="/<?php echo $prevPost->getRelativeUrl() ?>" class="link-primary">‹ {{news.prev}}</a>
|
<a href="<?php echo $prevPost->getRelativeUrl() ?>" class="link-primary">‹ {{news.prev}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<a class="prev-next-title" href="/<?php echo $prevPost->getRelativeUrl() ?>">
|
<a class="prev-next-title" href="<?php echo $prevPost->getRelativeUrl() ?>">
|
||||||
<?php echo htmlentities($prevPost->getTitle()) ?>
|
<?php echo htmlentities($prevPost->getTitle()) ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,10 +14,10 @@
|
||||||
<div class="next span6">
|
<div class="next span6">
|
||||||
<?php if ($nextPost = $post->getNextPost()): ?>
|
<?php if ($nextPost = $post->getNextPost()): ?>
|
||||||
<div class="prev-next-label">
|
<div class="prev-next-label">
|
||||||
<a href="/<?php echo $nextPost->getRelativeUrl() ?>" class="link-primary">{{news.next}} ›</a>
|
<a href="<?php echo $nextPost->getRelativeUrl() ?>" class="link-primary">{{news.next}} ›</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<a class="prev-next-title" href="/<?php echo $nextPost->getRelativeUrl() ?>">
|
<a class="prev-next-title" href="<?php echo $nextPost->getRelativeUrl() ?>">
|
||||||
<?php echo htmlentities($nextPost->getTitle()) ?>
|
<?php echo htmlentities($nextPost->getTitle()) ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php $url = urlencode(Request::getHostAndProto() . '/' . $post->getRelativeUrl()) ?>
|
<?php $url = urlencode(Request::getHostAndProto() . $post->getRelativeUrl()) ?>
|
||||||
<?php $title = urlencode($post->getTitle()) ?>
|
<?php $title = urlencode($post->getTitle()) ?>
|
||||||
<div class="social-share-buttons">
|
<div class="social-share-buttons">
|
||||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url ?>&t=<?php echo $title ?>" title="Share on Facebook" target="_blank">
|
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url ?>&t=<?php echo $title ?>" title="Share on Facebook" target="_blank">
|
||||||
|
|
Loading…
Add table
Reference in a new issue