Search code examples
expressionengineexpressionengine3

How to link to an entry in a channel in expressionengine?


I have the following code

<div id="navbar" class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
        {exp:channel:entries channel="static" sort="asc" dynamic="off"}
            <li><a href="{url_title}">{title}</a></li>
        {/exp:channel:entries}
    </ul>
</div><!--/.nav-collapse -->

Which is looping through a channel I have for static pages on my website. Technically it is showing all the stuff it should do. This is the code it outputs:

<div id="navbar" class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
        <li><a href="small-builders">Small Builders</a></li>
    </ul>
</div>

However, when I click the link it gives me a white page. I have the htaccess from the documentation set up. I'm new to ExpressionEngine. Am I missing something completely obvious? I just want to link the the entry I've created.


Solution

  • The way I fixed this was the enable the Pages plugin on ExpressionEngine. Where I'm using ExpressionEngine 3.0.5 the plugin isn't installed/activated by default like it is on EE2.

    Once this was activated I was able to assign templates and url structure no problem.