mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 09:37: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()
|
||||
{
|
||||
return $this->postType . '/' . $this->slug;
|
||||
return '/' . $this->postType . '/' . $this->slug;
|
||||
}
|
||||
|
||||
public function getSlug()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h3>Latest News</h3>
|
||||
<ul class="no-style">
|
||||
<?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 ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<div class="prev span6">
|
||||
<?php if ($prevPost = $post->getPrevPost()): ?>
|
||||
<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 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()) ?>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -14,10 +14,10 @@
|
|||
<div class="next span6">
|
||||
<?php if ($nextPost = $post->getNextPost()): ?>
|
||||
<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 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()) ?>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php $url = urlencode(Request::getHostAndProto() . '/' . $post->getRelativeUrl()) ?>
|
||||
<?php $url = urlencode(Request::getHostAndProto() . $post->getRelativeUrl()) ?>
|
||||
<?php $title = urlencode($post->getTitle()) ?>
|
||||
<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">
|
||||
|
|
Loading…
Add table
Reference in a new issue