zendframework / zf-web

Sources for the Zend Framework website
http://framework.zend.com/
78 stars 90 forks source link

Show message on outdated manual pages #137

Closed tfountain closed 7 years ago

tfountain commented 10 years ago

As part of my ongoing quest to try and get the majority of site visitors viewing current docs, this PR adds a prominent message to the top of manual pages if the user is viewing a page from an older ZF version. Where possible, the message will link to the equivalent page in the current release version. If the user is viewing the current release version, or a major maintained version, nothing is shown.

Here's how it looks if you're viewing a page in the 2.2 docs:

msg

And here's how it looks if you're viewing a 1.x version other than 1.12:

msg2

The logic is all in a view helper. I'm happy to tweak the wording or styling. The red colour was used as it's the 'alert' style from the foundation defaults, and is already used elsewhere on the site for form validation errors.

froschdesign commented 10 years ago

I would prefer the sidebar: alert-box

tfountain commented 10 years ago

I think I still prefer it in the middle, but I'm open to feedback from others.

froschdesign commented 10 years ago

I think I still prefer it in the middle

If you have a application with version 1.12 and you have to look at the docs for this version, then the big red alert box can be very annoying.

tfountain commented 10 years ago

The message doesn't appear on the 1.12 docs (because, as you say, that's still a supported version). The second screenshot in the PR description is from 1.11. Nothing appears on 1.12 or 2.3.

froschdesign commented 10 years ago

The message doesn't appear on the 1.12 docs…

Sorry, my mistake. I mean 1.11 or 2.1.

Another suggestion: alert-box

froschdesign commented 10 years ago

Btw. Good idea!

manuakasam commented 10 years ago

:thumbsup: great idea :thumbsup: Content-Area!

samsonasik commented 10 years ago

:+1: for in the content area.

samsonasik commented 9 years ago

need rebase

samsonasik commented 9 years ago

@tfountain it need rebase

froschdesign commented 7 years ago

Fix in new version: https://github.com/zendframework/zf3-web/pull/37