Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab Panels #119

Open
alphp opened this issue Mar 21, 2017 · 1 comment
Open

Tab Panels #119

alphp opened this issue Mar 21, 2017 · 1 comment

Comments

@alphp
Copy link
Contributor

alphp commented Mar 21, 2017

Would it be possible to simply create tab-panels?
I have tried it in several ways but in the end I had to resort to $ this-> Html-> tag and create them in a "manual" way.

<?php
	$navtabs = null;
	$tabs = null;

	$link = $this->Html->link('Tab #1', '/#1', ['data-toggle' => 'tab']);
	$navtabs .= $this->Html->tag('li', $link, ['class' => 'active']);
	$tabcontent = 'any content for the tab';
	$tabs .= $this->Html->div('tab-pane active', $tabcontent , ['id' => 1]);

	$link = $this->Html->link('Tab #2', '/#2', ['data-toggle' => 'tab']);
	$navtabs .= $this->Html->tag('li', $link);
	$tabcontent = 'any content for the tab';
	$tabs .= $this->Html->div('tab-pane', $tabcontent , ['id' => 2]);

	echo $this->Html->tag('ul', $navtabs, ['class' => 'nav nav-tabs']);
	echo $this->Html->div('tab-content', $tabs);
?>
@Holt59
Copy link
Collaborator

Holt59 commented Mar 21, 2017

The helpers are currently not able to do such things - this could be a really nice extension though!

This should not be very hard to implement - this would be close to the modal/helper panel, but probably easier - but I won't have the time to do it right now... If you want to give it a try, feel free to open a pull-request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants