Soon, we’ll be announcing a fresh new marketplace for TastyIgniter developers.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

how to redirect to list of restaurants from home page

#1 arnold Offline Newbie
Hi, i would like the local module on the front page to go direct to restaurant list instead, how can i archive this!
#2 sampoyigi Offline 1 == 2
You can archive this using the child-theme feature and changing the link on the html button.

First make sure you've created a child-theme... You can do this from the admin under Design - Themes.
Create a folder within your child theme called 'local_module', and create a file 'local_module.php' inside that folder.
Copy the content of view file 'extensions/local_module/views/local_module.php' into a newly created file.
You should have the same file content in 'your-child-theme/local_module/local_module.php' and 'extensions/local_module/views/local_module.php'
Now inside 'your-child-theme/local_module/local_module.php', find the if statement block on line 11
It should look like this,

PHP Code:
<?php if ($location_search_mode === 'multi') { ?>
    <form id="location-form" method="POST" action="<?php echo $local_action?>" role="form">
        <div class="input-group postcode-group">
            <input type="text" id="search-query" class="form-control text-center postcode-control input-lg" name="search_query" placeholder="<?php echo lang('label_search_query'); ?>" value="<?php echo $search_query?>">
            <a id="search" class="input-group-addon btn btn-primary" onclick="searchLocal()"><?php echo lang('text_find'); ?></a>
        </div>
    </form>
<?php } else { ?>
    <a class="btn btn-block btn-primary" href="<?php echo $single_location_url?>"><?php echo lang('text_find'); ?></a>
<?php ?>

replace it with

Code:
<a class="btn btn-block btn-primary" href="<?php echo site_url('local/all'); ?>"><?php echo lang('text_find'); ?></a>
I hope it helps and clear enough.
#3 arnold Offline Newbie
Thank you this has worked for me and if you don't mind  i now need to edit the view menu to something else, where can i access the code.
and is it possible to make the local search label into a drop down to enable clients just select their location instead.

thank you
#4 alban Offline Newbie
(08 Dec, 11:56 AM)arnold Wrote: Thank you this has worked for me and if you don't mind  i now need to edit the view menu to something else, where can i access the code.
and is it possible to make the local search label into a drop down to enable clients just select their location instead.

thank you

Yes for me too but I Have replace this link
<a class="btn btn-block btn-primary" href="<?php echo site_url('local/all'); ?>"><?php echo lang('text_find'); ?></a>
to this one

<a class="btn btn-primary btn-menus" href="<?php echo site_url('local?location_id='.$location_id).'#local-menus'; ?>"><i class="fa fa-cutlery"></i><span>&nbsp;&nbsp;<?php echo lang('text_goto_menus'); ?></span></a>


And it take me directly to the Menus.
#5 rushter777 Offline Newbie
Could this idea also be used to create a separate link to just the reservation pages? Like if I only wanted to use the reservation parts of the app only?

Possibly Related Threads...

Thread / Author
Notification
Last Post g3ry made 18 Jun, 01:02 PM
Forum Jump:

Users browsing this thread: 2 Guest(s)