Skip to content
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

Fix error in current page example #1262

Merged
merged 8 commits into from
Oct 19, 2023
19 changes: 9 additions & 10 deletions src/actions/guides/frontend/rendering_html.cr
Original file line number Diff line number Diff line change
Expand Up @@ -466,20 +466,19 @@ class Guides::Frontend::RenderingHtml < GuideAction
```crystal
nav do
ul do
link "Home",
to: Home::Index,
data_selected: current_page?(Home::Index)
li data_current: current_page?(Home::Index) do
link "Home", to: Home::Index
end

link "Your dashboard",
to: Dashboard::Index,
data_selected: current_page?(Dashboard::Index)
li data_current: current_page?(Dashboard::Index) do
link "Your dashboard", to: Dashboard::Index
end

link "Your profile",
to: Me::Show,
data_selected: current_page?(Me::Show)
li data_current: current_page?(Me::Show) do
link "Your profile", to: Me::Show
end
end
end

```

### Advanced usage
Expand Down