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

Update http_cache.rst #4098

Closed
wants to merge 1 commit into from
Closed

Update http_cache.rst #4098

wants to merge 1 commit into from

Conversation

Farkie
Copy link
Contributor

@Farkie Farkie commented Aug 6, 2014

Explained how the parameters are passed to the controller - named parameters

Explained how the parameters are passed to the controller - named parameters
public function content($max_per_page = 10, $type = "news")
{


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I agree we can highlight this better. But it's also true of render, not only render_esi. Also, I think the standards are maxPerPage and the controller name should be contentAction (since most people are probably using the normal shortcut syntax for the controller.

We do show the $max variable being passed as an argument in the next example. Perhaps we just need to add a note about that. For example:

.. tip::

    Any extra variables you pass (like ``max`` in the above example) will become arguments
    to your controller (e.g. ``$max``). You can see this in the controller below.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but I think we need to be explicit with the named part. Those variables were just made up to be honest, Easy to change :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Farkie You want to be explicit with the named part? So what do you mean/propose exactly? Sorry, I don't understand - I think you agree with changing the variable names but I'm not sure what you think about my other points :). Can you make the changes you think make sense? That might help.

Thanks!

@weaverryan
Copy link
Member

Hey @Farkie I've re-opened this PR with some changes - see #4338. Can you let me know if you like it?

Thanks!

@weaverryan weaverryan closed this Oct 18, 2014
weaverryan added a commit that referenced this pull request Oct 19, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

ESI Variable Details Continuation

This continues #4098.

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets | n/a

Thanks!

Commits
-------

ded7577 Clarifying a bit more that you're passing variables into your controller
5877d02 Update http_cache.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants