Getting Variables when useSeoUrls = true

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 8, 2015   (RSS)

By gregThomas - July 8, 2015

Hey,

I'm not sure what useSeoUrls is, could you give me a bit more information on it? I'm guessing it's a system for adding rules to htaccess?

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By theclicklab - July 8, 2015

Yep, its part of CMSB. It's an options for load viewer library:

https://www.interactivetools.com/docs/cmsbuilder/viewer_options.html

By gregThomas - July 8, 2015

Thanks! I wasn't aware of that feature in CMSB. After looking at how it sends variables, if you add /photos/ to the end of your URL, the system will add an empty variable called photos to the request array. So you could detect if photos is in the URL using the following method:

<?php if(isset($_REQUEST['photos']): ?>
  <!-- photo html and code goes here -->
<?php endif; ?>

Isset is used to detect if a variable exists, and will return true even if the variable is empty, contains zero or null. So this code will check if photos  was sent in the URL, even if it's empty. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By theclicklab - July 8, 2015

OK great thanks will try that and let you know if it works, fantastic :)