Andy Holmes
Andy Holmes

Reputation: 8077

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.

Upvotes: 2

Views: 243

Answers (3)

Andy Holmes
Andy Holmes

Reputation: 8077

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.

Upvotes: 1

Chris O&#39;Connor
Chris O&#39;Connor

Reputation: 11

If you try to go to abc.com/index/small-builders does it work? (added index)

I don't know if you're hiding index in the url or not but that can cause it.

Upvotes: 1

Jelle Dijkstra
Jelle Dijkstra

Reputation: 499

guess your post would be better on the expressionengine.stackexchange.com site. Post it there and i´ll have a look if i can explain this to you

Upvotes: 0

Related Questions