Advertisement:

Author Topic: osc_list_region_url() not works properly  (Read 568 times)

abc500x500

  • Jr. Member
  • **
  • Posts: 96
osc_list_region_url() not works properly
« on: August 12, 2018, 07:50:45 pm »
Hi
Please help.
I use this in search.php bender theme but i think it not works properly.

Code: [Select]
<a href="<?php echo osc_list_region_url(); ?>"
only shows this url:
Code: [Select]
http://localhost/osclass/index.php?page=searchbut i think it must show it:

Code: [Select]
http://localhost/osclass/index.php?page=search&sRegion=current-region-nameor something like it.
Please help.
Thanks

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: osc_list_region_url() not works properly
« Reply #1 on: August 13, 2018, 10:05:24 pm »
Nobody want help?

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2133
  • osclass.work
Re: osc_list_region_url() not works properly
« Reply #2 on: August 14, 2018, 02:43:24 am »
Hi,
this helper function is intended to be used in a loop, not alone on its own. Check Bender's main.php code for idea.

Regards
dev101

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: osc_list_region_url() not works properly
« Reply #3 on: August 14, 2018, 04:18:01 pm »
Thanks

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: osc_list_region_url() not works properly
« Reply #4 on: August 14, 2018, 04:35:56 pm »
Thanks

Quote
osc_list_region_url() - Gets the url of current "list region"
https://doc.osclass.org/HSearch.php

in above said: Gets the url of current "list region"
It say this function only one url create for us.

WEBmods

  • Hero Member
  • *****
  • Posts: 830
  • aka patrickFromCroatia | Osclass Dev Services
Re: osc_list_region_url() not works properly
« Reply #5 on: August 14, 2018, 04:49:02 pm »
Hello,

If you want to get URL for the currently selected region, this may work:

Code: [Select]
<?php
$url 
osc_search_url(array('sRegion' => Params::getParam('sRegion')));
?>


Regards.

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: osc_list_region_url() not works properly
« Reply #6 on: August 14, 2018, 04:51:40 pm »
Hello,

If you want to get URL for the currently selected region, this may work:

Code: [Select]
<?php
$url 
osc_search_url(array('sRegion' => Params::getParam('sRegion')));
?>


Regards.

thanks
« Last Edit: August 16, 2018, 06:44:07 pm by abc500x500 »

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: osc_list_region_url() not works properly
« Reply #7 on: August 14, 2018, 04:52:34 pm »
Thanks

Quote
osc_list_region_url() - Gets the url of current "list region"
https://doc.osclass.org/HSearch.php

in above said: Gets the url of current "list region"
It say this function only one url create for us.

I understood. thanks . it works with loops