This one is really making me scratch my head. I thought I was done, and now when I click on a post title on the main page, it takes me to the base url template, not the page template. I'm really at a loss as to what I changed. Switching themes back to Antimatter makes it work correctly, but I can't find the mistake. Any ideas?
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Archive
What does the HTML look like for the link in the Bootstrap Twig template? Will probably be something like:
TWIG
<h3><a href="{{ page.url }}">{{ page.title }}</a></h3>
In my option, i save base_url variable into theme, example:
PHP
$this->grav['twig']->twig_vars['base_url'] = $this->grav['page']->find($this->grav['config']->get('system.home.alias'))->url(true);
If you want save into theme directly you can use this:
TWIG
{% set base_url = page.find(config.system.home.alias).url(true) %}
---
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1318 | 9 years ago | ||
| 2 | 915 | 9 years ago | ||
| 2 | 4044 | 9 years ago | ||
| 1 | 2920 | 9 years ago | ||
| 3 | 1104 | 9 years ago |