Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Optional regions and template parameters

Guest
May 16, 2007 May 16, 2007
I would appreciate any help I can get on this problem. Here's what I'm trying to do, and I've been trying to do it with a template and optional regions.

I have eight different optional regions I want to display depending on the user successfully completing a quiz. What I've been trying to do is set the page up so once the quiz is completed, the user is brought back to this page along with a URL parameter that is simply a number indicating which quiz they just completed. The page would use that parameter to determine which regions to show.

So, I created a template with a parameter and the optional regions. It all works fine when I manually change the value of the parameter using the "Template Properties..." dialog box. What I want to do is substitute the value of the URL parameter in place of the value normally set by this dialog box, but it does not appear to be possible. If it is, can someone please tell me how to do it? If it is not, does anyone have any suggestions about how to accomplish the equivalent behavior?

Thanks,

Mark
TOPICS
Server side applications
587
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2007 May 16, 2007
This cannot work. You are trying to mix a run-time event (the url
parameter) with a design-time feature (DW's optional regions). They are in
completely separate space-time continua.

I suggest you use some server scripting to take the URL parameter and use it
to set the visibility of a page element displaying your desired content.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"MDiana" <webforumsuser@macromedia.com> wrote in message
news:f2fd70$5va$1@forums.macromedia.com...
>I would appreciate any help I can get on this problem. Here's what I'm
>trying
> to do, and I've been trying to do it with a template and optional regions.
>
> I have eight different optional regions I want to display depending on the
> user successfully completing a quiz. What I've been trying to do is set
> the
> page up so once the quiz is completed, the user is brought back to this
> page
> along with a URL parameter that is simply a number indicating which quiz
> they
> just completed. The page would use that parameter to determine which
> regions to
> show.
>
> So, I created a template with a parameter and the optional regions. It all
> works fine when I manually change the value of the parameter using the
> "Template Properties..." dialog box. What I want to do is substitute the
> value
> of the URL parameter in place of the value normally set by this dialog
> box, but
> it does not appear to be possible. If it is, can someone please tell me
> how to
> do it? If it is not, does anyone have any suggestions about how to
> accomplish
> the equivalent behavior?
>
> Thanks,
>
> Mark
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 16, 2007 May 16, 2007
Murray,

Thanks for the response. I'm guessing if you say it can't be done with DW templates, it can't be done with DW templates. I have been accused of being in a different space-time continuum myself, but I had somehow hoped I could plug in a simple PHP getParameter statement inside the template code. <sigh>

For the rest of you out there, if you have any suggestions for coding this in PHP, please let me know.

Thanks,

Mark
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 16, 2007 May 16, 2007
<?php if ($_GET['quiz_variable'] == '1') {?>
content here
<?php }?>

something like this ?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 16, 2007 May 16, 2007
Günter,

So simple! It just goes to show that relying on DW code generation features can dull the mind. Thanks for your help, it works perfectly as is.

Take care,

Mark
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2007 May 16, 2007
Or how about this -

<style type="text/css">
<!--
#quizElement<?php echo ($_GET['quiz_variable'] ) ?> { display:block; }
-->
</style>

and have

#quizElement1, #quizElement2, etc. {display:none; }

in a previously linked stylesheet.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"geschenk" <webforumsuser@macromedia.com> wrote in message
news:f2flcb$fvq$1@forums.macromedia.com...
> <?php if ($_GET['quiz_variable'] == '1') {?>
> content here
> <?php }?>
>
> something like this ?


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 16, 2007 May 16, 2007
>>
<style type="text/css">
<!--
#quizElement<?php echo ($_GET['quiz_variable'] ) ?> { display:block; }
-->
</style>

and have

#quizElement1, #quizElement2, etc. {display:none; }
>>

wow, that´s a clever approach !!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2007 May 16, 2007
LATEST
What's fun about this game is that there are so many different ways to skin
cats! 8)

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"geschenk" <webforumsuser@macromedia.com> wrote in message
news:f2fqsp$mkp$1@forums.macromedia.com...
>>>
> <style type="text/css">
> <!--
> #quizElement<?php echo ($_GET['quiz_variable'] ) ?> { display:block; }
> -->
> </style>
>
> and have
>
> #quizElement1, #quizElement2, etc. {display:none; }
> >>
>
> wow, that?s a clever approach !!
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines