Created
July 11, 2013 09:13
-
-
Save leevigraham/5973907 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$EE = get_instance(); | |
$limit = $EE->input->get('show-all') ? 100 : 3; | |
?> | |
{exp:channel:entries limit="<?php print($limit); ?>"}{/exp:channel:entries} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know this is likely to be quick and illustrative of how to solve the problem and not for production, but I thought I'd highlight my typical route: The wrapper plugin.
index.html
pi.myplugin.php
This allows you to get away with not having PHP enabled in templates but then also parse a whole array of URI query strings and then feed them into a Channel entries tag. For more advanced usage you can even initialise the Channel class yourself and forego the need for the channel:entries tag altogether.
Just FYI.