close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show/Hide Region in Template

Thread began 7/06/2010 6:34 pm by Brad Lawryk | Last modified 7/06/2010 7:36 pm by Brad Lawryk | 862 views | 7 replies |

Brad Lawryk

Show/Hide Region in Template

Hi guys,

Seems you can't show or hide a region based on whether or not the user is logged in on the template?

I have a navigation menu in the template that shows on all pages of course. But I need these to be hidden if not logged in and I need one of the menus hidden based on acces level.

How can this be done with using templates?

Thanks,
Brad

Sign in to reply to this post

AlaskaTomBeta Tester

Brad,
I have done this with templates a number of time. You need to make sure that your template is a php file (ie template.dwt.php)

you can then wrap the area you want hidden in a 'show region' under security assist


It will place code at the top of the page though,that may not be propogated to your pages that already have php above the head.

<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>

not a problem tho, as you can manually add it.

Tom

Sign in to reply to this post

Brad Lawryk

Thanks Tom, worked great!

Except now I get an error on the log out page?

Fatal error: Call to undefined function: wa_auth_rulepasses() in E:\koparadmin_main_website_asp\dashboard\staff_LogOut.php on line 208

Line 208: <?php if(WA_Auth_RulePasses("Logged in to staff")){ // Begin Show Region ?>

Sign in to reply to this post

AlaskaTomBeta Tester

Feel free to zip up that page and attach it.
do you have the
<?php require_once( "/WA_SecurityAssist/Helper_PHP.php" ); ?>
at the top of that page?

Tom

Sign in to reply to this post

Brad Lawryk

Unfortunately its a government site and I can't send files ... but I'll try adding that line.

Thanks .. you have put me in the right direction anyways.

Brad

Sign in to reply to this post

AlaskaTomBeta Tester

no problem, I understand.

The problem as I mentioned with applying that to a template that you have already generated pages for, is on pages that already have php above the opening html tag, it will not add the required php require_once
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>

The path may be different, but you get the point.

Hope business is good. I see you around the adobe forums, and used to see you years ago around the old interakt forums if I recall correctly :-)

Tom

Sign in to reply to this post

Brad Lawryk

Originally Said By: AlaskaTom
  I see you around the adobe forums, and used to see you years ago around the old interakt forums if I recall correctly :-)  



Yep, those would be my old (InterAKT) and my new (Adobe) stomping grounds. ;-)

Brad

Sign in to reply to this post

Brad Lawryk

After playing around a bit your suggestion worked like a charm!

Thanks Tom ... all is well now. Well at least for now. ;-)

Brad

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...