Re: [development] Passing options to the front page
At 05:00 AM 7/13/2010, Jeff Greenberg wrote:
I'd like to have some dynamic theme changes to the front page based on items clicked on the front page. What's the best way to do this? I know that ?page= is valid, as is ?q=
Are you submitting these clicks as a form? If so, you can use phptemplate_preprocess_page to grab them from the $_POST array. But this kinda sounds like it might be better implemented as a jQuery function. LVX TF --- As If Productions http://www.asifproductions.com Interactive Worlds and Immersive Obsessions
The jquery could be what I end up doing. The form would be one way to go, but I was thinking more in terms of simple links and working off the extra information they carry. I like the idea of the resulting page rendering being something that could be bookmarked, which wouldn't be the case with jquery or $_POST. On 7/13/2010 8:25 AM, As If Productions wrote:
Are you submitting these clicks as a form? If so, you can use phptemplate_preprocess_page to grab them from the $_POST array. But this kinda sounds like it might be better implemented as a jQuery function.
Decided to finesse the problem description. Let's say I have a function that will change the data shown on the front page based on a parameter. The parameter should be provided via the url, so that it can be bookmarked, entered directly into the browser by the user, or selected from a link. How can that be done?
As long as it's not security sensitive data, and you sanitize before you output anything passed in the URL, there's nothing wrong with using $_GET. Drupal will play nice, whether or not clean urls are enabled. All the Best, Matt Chapman Ninjitsu Web Development On Tue, Jul 13, 2010 at 2:11 PM, Jeff Greenberg <jeff@ayendesigns.com> wrote:
Decided to finesse the problem description. Let's say I have a function that will change the data shown on the front page based on a parameter. The parameter should be provided via the url, so that it can be bookmarked, entered directly into the browser by the user, or selected from a link. How can that be done?
Matt, thanks for reminding me that when there's no useful weapons around, a rock works as well as it always has! Best, Jeff On 07/13/2010 09:28 PM, Matt Chapman wrote:
As long as it's not security sensitive data, and you sanitize before you output anything passed in the URL, there's nothing wrong with using $_GET. Drupal will play nice, whether or not clean urls are enabled.
participants (3)
-
As If Productions -
Jeff Greenberg -
Matt Chapman