cryostar Posted July 3, 2021 Share Posted July 3, 2021 I created a PW module for a new admin page and I have set some buttons and a lister in an execute.php file: <div> <a class="ui-button" href="./upload-batch-record">Upload batch</a> <a class="ui-button" href="./export-filtered">Export filtered result</a> <a class="ui-button" href="./generate-template">Generate CSV Template</a> <a class="ui-button" href="<?= $addUrl ?>">Add New</a> </div> <hr class="uk-divider-small" /> <?= $table ?> Though to my surprise, Lister is also generating these buttons on top of the table like this: What can I do to prevent this? Link to comment Share on other sites More sharing options...
cryostar Posted July 3, 2021 Author Share Posted July 3, 2021 The answer lies in my ___execute method in my module file. I should return the lister only if it's an AJAX request. So I was able to do it with: if($this->config->ajax) return $lister->execute(); return array( 'table'=>$lister->execute() ); under ___execute Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now