New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag `nav:exists` only outputs 1 #678

Closed
andypillip opened this Issue May 11, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@andypillip

andypillip commented May 11, 2016

Steps to reproduce

  1. Create a layout, template or partial that uses a nav:exists block, contents don't matter
  2. Create subpages for a page
  3. Visit that page

Expected behaviour

The contents of the nav:exists block should be output.

Actual behaviour

Only 1 is output.

Server configuration

Operating system: F22 Linux, 64-bit

Web server: PHP -S

PHP version: 5.6.20

Statamic version: 2.0.3

Updated from an older Statamic or fresh install: Fresh install

List of installed addons: None

Logs

Logs are empty.

@andypillip

This comment has been minimized.

andypillip commented May 11, 2016

Actually the following line works then:

{{ if {nav:exists} }}
{{ /if }}

Maybe the documentation should be updated?

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented May 11, 2016

You're absolutely right. I ported it incorrectly. jason--

The way you just explained is how it works now, but the way it worked in v1 is how it should work.

@jasonvarga jasonvarga added the bug label May 11, 2016

@andypillip

This comment has been minimized.

andypillip commented May 11, 2016

@jasonvarga thanks for your quick reply.

So you'll change the implementation? Then I'll leave the documentation alone (:

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented May 11, 2016

Yeah I'll change the implementation and the docs.

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented May 12, 2016

Fixed for next release. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment