I have adjusted my mainnav.php file in the T3 template for joomla so my navigation is fixed to the top of the page. However, I cannot figure out how to add my logo to the left of my fixed navigation?
<!-- MAIN NAVIGATION -->
<nav id="t3-mainnav" class="wrap navbar navbar-default t3-mainnav navbar-fixed-top navbar-collapse-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<?php if ($this->getParam('navigation_collapse_enable', 1) && $this->getParam('responsive', 1)) : ?>
<?php $this->addScript(T3_URL.'/js/nav-collapse.js'); ?>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".t3-navbar-collapse">
<i class="fa fa-bars"></i>
</button>
<?php endif ?>
<?php if ($this->getParam('addon_offcanvas_enable')) : ?>
<?php $this->loadBlock ('off-canvas') ?>
<?php endif ?>
</div>
<?php if ($this->getParam('navigation_collapse_enable')) : ?>
<div class="t3-navbar-collapse navbar-collapse collapse"></div>
<?php endif ?>
<div class="t3-navbar navbar-collapse collapse">
<jdoc:include type="<?php echo $this->getParam('navigation_type', 'megamenu') ?>" name="<?php echo $this->getParam('mm_type', 'mainmenu') ?>" />
</div>
</div>
</nav>
<!-- //MAIN NAVIGATION -->
You have to add logo div before <div class="container"> and float both divs left like:
#t3-mainnav .logo_container,
#t3-mainnav .container {
float: left;
}
Hope this helps
Related
So far my footer has always done it. But suddenly it disappeared when I started my site. This is a seperated footer in a wordpress site. Loading is going well, because when I use a different code for my footer, it works. I suspect something is not right in my footer.php, but I don't know what?
I have tried some other pieces of code from other footer.php 's. This worked but could not find the difference between my code and theirs.
This is my footer.php (My active theme is a yoga child theme):
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after.
*
* #package yoga
*/
?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!--==================== FOOTER====================-->
<?php
$yoga_footer_widget_background = get_theme_mod('yoga_footer_widget_background');
if($yoga_footer_widget_background != '') { ?>
<footer style="background-image:url('<?php echo esc_url($yoga_footer_widget_background);?>');">
<?php } else { ?>
<footer>
<?php } ?>
<div class="overlay">
<!--Start yoga-footer-widget-area-->
<?php if ( is_active_sidebar( 'yoga-footer_widget_area' ) ) { ?>
<div class="yoga-footer-widget-area">
<div class="container">
<div class="row">
<?php dynamic_sidebar( 'yoga-footer_widget_area' ); ?>
<!-- Contact symbols -->
<div id="text-4" class="col-md-4 col-sm-6 yoga-widget widget_text">
<div class="textwidget">
<a href="# 1"><i class="fab fa-facebook-square fa-3x"></i><a>
<a href="#2"><i class="fab fa-linkedin fa-3x"></i><a>
<a href="#3"><i class="fab fa-instagram fa-3x"></i><a>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<!--End yoga-footer-widget-area-->
</div>
</footer>
<!--Scroll To Top-->
<i class="fa fa-caret-up"></i>
<!--/Scroll To Top-->
<?php wp_footer(); ?>
</body>
</html>
I hope someone can see the error in my code, and has a solution for it.
I am currently displaying content from my database using a foreach loop within a boostrap panel. However the layout is not behaving as I expected it too, I have tried resolving this using breaks which had fixed the layout from being worse than it is at the present. However it is still off if you take a look at the image below :-
In addition to this I also have bootstrap dropdown menu's that are not working at all embedded within a div.
This is my code -
<div class="parabox">
<!-- Collect the nav links, forms, and other content for toggling -->
<!-- Search -->
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search For Comics">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<strong><p class="navbar-text">Sort Comics By : </p></strong>
<ul class="nav navbar-nav">
<li class="dropdown">
Order Comics<span class="caret"></span>
<ul class="dropdown-menu">
<li>Ascending Order</li>
<li>Descending Order</li>
<li>Numerical Order</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-left">
<li class="dropdown">
Universe<span class="caret"></span>
<ul class="dropdown-menu">
<li>Dark Horse Comics</li>
<li>DC</li>
<li>IDW</li>
<li>Image</li>
<li>Marvel</li>
<li>Valiant</li>
</li>
</ul>
</div>
</div>
</br>
<!-- Start of Col Div -->
<div class="col-md-12">
<!--/.Panel for Comics -->
<!-- Count for Comics -->
<?php
if(count($comics)){
?>
</br>
<div class="panel panel-default">
<div class="panel-heading panel-heading-green">
<h3 class="panel-title">My Comics</h3>
</div>
<div class="panel-body">
<div class="row">
<!--/.row1 -->
<!-- Display each comic by id -->
<?php foreach($comics as $list): ?>
</br>
<div class="col-md-3 comic">
<a href="#">
<?= ($list['image'] <> " " ? "<img style='max-width:200px; max-height:250px;' src='Images/{$list['image']}'/>" : "") ?>
</a>
<div class="comic-title">
<?= ($list['name'] <> "" ? $list['name'] : "") ?> #<?= ($list['issue'] <> "" ? $list['issue'] : "") ?>
</div>
<div class="comic-add">
</div>
</div>
<!-- End of Foreach Statement for Comics -->
<?php endforeach; ?>
<!-- Else show this message if user has no entries -->
<?php
}else {
?>
<p><b>You haven't posted any comic yet!</b></p>
<?php } ?>
</div>
</div>
</div>
<!--/.row1-collapse -->
</div>
<!-- /.container -->
</div>
I am using MVC format which is why the code may seem short or missing pieces which is in header and footers within my template part of my application. Any ideas on what I can do to sort the layout out and get the dropdown menu's to work as they do seem a little related ?
As far as I know, bootstrap requires you to always have a markup like:
<div class="container">
<div class="row">
<div class="col-*">…</div>
<!-- many more cols -->
</div>
</div>
So this:
container
row
col
col
col
row
…
structure should always be give, whereby this structure can be nested.
This way the layout has all the negative margin magic applied
UPDATE
According to the posted image I guess that the resulting markup is corrupted (if the »container > row > col« structure exists). I recommend to have a a look at the browser console and compare the resulting dom tree with the expected. It is also very helpful to search the page source, in Firefox corrupted elements (missing closing tag, wrong attributes etc) are shown in red, so this helps to find the bug.
*Create a wrapper div to hold the image, title etc. Then for that div add a css with the style as display:inline-block; So if it is not able to accomodate with in the view in browser, it will get automatically wrapped into the next line. Follow this example see teh working sample code created by some one: http://jsfiddle.net/ajruk60t/3/*
You must break your line after the number of columns your row can contain. For instance, if you use col-3, then you must not define more than 4 columns. At this point, you recreate a row and carry on.
<div class="row">
<?php
$i = 1;
foreach($comics as $list) { ?>
<div class="col-md-3">
...
</div>
<?php
if ($i % 4 == 0) {
?></div><div class="row"><?php
}
$i++;
?>
<?php } ?>
</div>
Alternatively, you can create the same effect adding manual breakpoints rather than recreating a row. I have not tried this solution myself, but read it here:
<div class="clearfix visible-md-block"></div>
Thank you for your help it steered me to the answer which was the foreach loop had to start after the break.
<?php require('template/header.phtml') ?>
<div class="container">
<div class="row">
<!-- Start of Col Div -->
<div class="col-md-12">
<!--/.Panel for Comics -->
<!-- Count for Comics -->
<?php
if(count($comics)){
?>
</br>
<div class="panel panel-default">
<div class="panel-heading panel-heading-green"><h3 class="panel-title">My Comics</h3></div><!-- End of Panel Heading -->
<div class="panel-body">
<div class="row">
<!--/.row1 -->
<!-- Display each comic by id -->
</br> <?php foreach($comics as $list): ?>
<div class="col-md-3 comic">
<a href="#">
<?= ($list['image'] <> " " ? "<img style='max-width:200px; max-height:250px;' src='Images/{$list['image']}'/>" : "") ?>
</a>
<div class="comic-title">
<?= ($list['name'] <> "" ? $list['name'] : "") ?> #<?= ($list['issue'] <> "" ? $list['issue'] : "") ?>
</div>
<div class="comic-add">
</div>
</div> <!-- End of Col-MD-3 Comic -->
<!-- End of Foreach Statement for Comics -->
<?php endforeach; ?>
<!-- Else show this message if user has no entries -->
<?php
}else {
?>
<p><b>You haven't posted any comic yet!</b></p>
<?php } ?>
</div><!-- end of row -->
</div> <!-- end of panel body -->
</div> <!-- end of panel panel-default -->
<!--/.row1-collapse -->
</div> <!-- end of col-md-12 -->
</div> <!-- End of Row -->
</div> <!-- /.container -->
<?php require('template/footer.phtml') ?>
I am trying to do the Cart slider which can be seen at http://bootsnipp.com/snippets/Pbnxx
I am struggling with proper PHP syntax. Can anyone help me out?
The way I see it that I need to prepend .item and .row for every 4 columns, but something is glitching and doesn't work as expected
<div class="container">
<div class="row">
<div class="col-md-9">
<h3>TITLE </h3>
</div>
<div class="col-md-3">
<!-- Controls -->
<div class="controls pull-right hidden-xs">
<a class="left fa fa-chevron-left btn btn-success" href="#carousel-example"
data-slide="prev"></a>
<a class="right fa fa-chevron-right btn btn-success" href="#carousel-example"
data-slide="next"></a>
</div>
</div>
</div>
<div id="carousel-example" class="carousel slide hidden-xs" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<?php
while ( $query->have_posts() ) :
$query->the_post();
// make new slide every 4 columns
if($i % 4 == 0) : ?>
<div class="item <?php if($a++ == 0) echo 'active'; ?>">
<div class="row">
<?php endif; ?>
<div class="col-sm-3">
<div class="col-item">
<?php echo $i; ?>
</div>
</div>
<!-- end slide every 4 columns -->
<?php if($i++ % 4 == 0) : ?>
</div> <!-- row -->
</div> <!-- slide -->
<?php endif; ?>
<?php endwhile; ?>
</div> <!-- end carousel -->
</div> <!-- carousel-example -->
</div> <!-- container -->
I think your .row should be also .item because you want to slide 4 items at time.
Here you have my code using smarty. I used array_chunk($items, 4) and nested loops.
<div class="carousel-inner">
{foreach $recipebox.recipes as $key=>$recipeSet}
{if $key == 0}
<div class="row item active">
{else}
<div class="row item">
{/if}
{foreach $recipeSet as $recipe }
<div class="col-xs-3">
// box content
</div>
{/foreach}
</div>
{/foreach}
</div>
I'm having trouble with the Blog portion of my project I'm working on. I have made a new template and pointed the Blog page to that template but no posts show up on the page. I have also went under Reading > and changed the Posts Page to Blog, the whole page doesn't show up. Below is the code and a link:
http://www.hbaofwashingtoncounty.org/hbawc2014/blog/
<?php
/*
Template Name: Blog
*/
;?>
<?php get_header();?>
<div class="inner">
<!-- Content Section Start -->
<div class="contentsec-new twocol">
<!-- Top Header Start -->
<div class="topheader">
<div class="inner">
<!-- Logo Start -->
<div class="logo">
<a href="<?php echo home_url();?>">
<?php if($logo_img = $_extracoding->set_value('LOGO', get_template_directory_uri().'/images/logo.png', true)): ?>
<img src="<?php echo $logo_img;?>" alt="<?php bloginfo('name');?>" id="logo" />
<?php else:?>
<span class="logo"> </span>
<?php endif;?>
</a>
</div>
<!-- Logo End -->
<!-- Right Header Start -->
<div class="righthead">
<div class="topsec">
<!-- Service Time and Search Start -->
<!-- Service Time and Search End -->
<!-- Top Navigation Start -->
<div class="menuwrapper">
<?php $redirectTo = (is_home() || is_front_page()) ? home_url() : $_SERVER['REQUEST_URI'];?>
<?php if( ! is_user_logged_in()): ?>
<ul class="topnavi" style="float:right;">
<li><?php _e('Member Login', 'heavens_corner');?>
<!-- Login Bubble Start -->
<div id="loginbox"> <span class="logintop"> </span>
<div class="logincenter">
<h3 class="white bold upper"><?php _e('User Login', 'heavens_corner');?></h3>
<form action="<?php bloginfo('url');?>/wp-login.php" method="post" name="loginform" id="loginform">
<ul>
<li><h5 class="white"><?php _e('User Name', 'heavens_corner');?></h5></li>
<li><input name="log" type="text" class="bar" /></li>
<li><h5 class="white"><?php _e('Password', 'heavens_corner');?></h5></li>
<li><input name="pwd" type="password" class="bar" /><input type="hidden" value="<?php echo $redirectTo;?>" name="redirect_to" /></li>
<li><?php _e('Forget Password?', 'heavens_corner');?> </li>
<li class="nopading"><input type="submit" value="<?php _e('Sign in Now', 'heavens_corner');?>" class="button backcolr" /></li>
</ul>
</form>
</div>
<span class="loginbottom"> </span> </div>
<!-- Login Bubble End -->
</li>
</ul>
<?php else:?>
<ul class="topnavi" style="float:right;">
<li><?php _e('Logout', 'heavens_corner');?>
</ul>
<?php endif;?>
<?php wp_nav_menu(array('theme_location'=>'top-menu', 'container'=>false, 'menu_class'=>'topnavi')); //Top menu?>
<br />
<?php wp_nav_menu(array('theme_location'=>'main-menu', 'container'=>false, 'menu_class'=>'subnavi')); //Top menu?>
</div>
<!-- Top Navigation End -->
</div>
<ul class="boxed">
<?php get_template_part('modules/top_links');?>
<!-- Search Start -->
<li class="last">
<?php echo get_search_form(); //Search form ?>
</li>
<!-- Search End -->
</ul>
<div class="clear"></div>
<?php if($header_settings = get_option(THEME_PREFIX.'general_settings')):?>
<!--Header Short Text-->
<div class="watchlive">
<h3><?php echo character_limiter(kvalue($header_settings, 'header_text'), 50);?></h3>
</div>
<?php endif;?>
</div>
<!-- Right Header End -->
</div>
</div>
<!-- Bread Crumb Start -->
<div class="breadcrumb" style="margin-top:24px;">
<?php echo get_the_breadcrumb(); ?>
</div>
<!-- Bread Crumb End -->
<!-- Sub Page Banner Start -->
<div class="subbanner">
<?php fw_top_banner('category'); //Get big header image?>
</div>
<!-- Sub Page Banner End -->
<!-- Column 3 Start -->
<div class="col3 border-right left">
<!-- Blog Start -->
<div class="blog">
<h1 class="heading colr"><?php single_cat_title();?></h1>
<!-- Blog Post Start -->
<div class="post noborder nopading">
<?php while ( have_posts() ) : the_post(); ?>
<div class="post-date backcolr">
<span><?php echo get_the_date('j');?></span>
<span><?php echo get_the_date('M');?></span>
</div>
<div class="post-heading">
<h5><?php the_title(); ?></h5>
</div>
<div class="clear"></div>
<?php if($media = fw_post_video('w=667&h=369&showThumb=1&thumbSize=category-featured')):?>
<div class="post-thumb">
<?php echo $media;?>
</div>
<?php endif;?>
<div class="post-feat">
<ul>
<li class="authore"><?php _e('by,', 'heavens_corner');?> <?php the_author();?></li>
<li class="comments"><?php comments_number();?></li>
<?php if(has_tag()):?><li class="tags"><?php the_tags();?></li><?php endif;?>
</ul>
</div>
<div class="clear"></div>
<div class="post-desc">
<p><?php echo (function_exists('the_exerpt')) ? get_the_exerpt() : character_limiter(get_the_content(),450,'',true);?></p>
<?php _e('Keep Reading', 'heavens_corner');?>
</div>
<?php endwhile; ?>
</div>
<!-- Blog Post End -->
<!-- Pagination Start -->
<?php if($wp_query->max_num_pages > 1):?>
<div class="paginations">
<ul><?php fw_blog_pagination(); ?></ul>
</div>
<?php endif;?>
<!-- Pagination End -->
</div>
<!-- Blog End -->
</div>
<!-- Column 3 End -->
<!-- Column 1 Start -->
<div class="col1 right">
<!-- Widget Start -->
<?php fw_dynamic_sidebars('category', get_query_var('cat'));?>
<!-- Widget End -->
</div>
<!-- Column 1 End -->
</div>
<!-- Content Section End -->
</div>
<div class="clear"></div>
<!-- Footer Start -->
<?php get_footer(); ?>
I am new to codeigniter, From My senior i got one task to solve existing undone internal project. and develop that project again.
i am having query when i am ruinning this project.
here i am pasting my 2 view files.
tell me if any one required further files.
Thank you in advanced.
TODO DropDown View
<!-- BEGIN TODO DROPDOWN -->
<?php
if (isset($pendingtask)) {
?>
<li class="dropdown" id="header_task_bar">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
<i class="icon-tasks"></i>
<span class="badge"><?php echo count($pendingtask); ?></span>
</a>
<ul class="dropdown-menu extended tasks">
<li>
<p>You have <?php echo count($pendingtask); ?> pending tasks</p>
</li>
<li>
<ul class="dropdown-menu-list scroller" style="height:250px">
<?php
if (!empty($pendingtask)) {
foreach ($pendingtask as $task_row) {
?>
<li>
<a href="<?php echo base_url(); ?>milestone/viewMilestone/<?php echo $task_row->id; ?>">
<span class="task">
<span class="desc"><?php echo $task_row->title; ?></span>
<span class="percent">30%</span>
</span>
<span class="progress progress-success ">
<span style="width: 30%;" class="bar"></span>
</span>
</a>
</li>
<?php
}
}
?>
</ul>
</li>
<li class="external">
See all tasks <i class="m-icon-swapright"></i>
</li>
</ul>
</li>
<!-- END TODO DROPDOWN -->
<?php } ?>
pagetopnavigation view
<!-- BEGIN HEADER -->
<div class="header navbar navbar-inverse navbar-fixed-top">
<!-- BEGIN TOP NAVIGATION BAR -->
<div class="navbar-inner">
<div class="container-fluid">
<?php $this->load->view('include/pagelogo'); ?>
<!-- BEGIN TOP NAVIGATION MENU -->
<ul class="nav pull-right">
<?php //$this->load->view('include/pagetopnotifications'); ?>
<?php //$this->load->view('include/pagetopnewmessage'); ?>
<?php $this->load->view('include/pagetoptodo', $pendingtask); ?>
<?php $this->load->view('include/pagetopuserprofile'); ?>
</ul>
<!-- END TOP NAVIGATION MENU -->
</div>
</div>
<!-- END TOP NAVIGATION BAR -->
</div>
<!-- END HEADER -->
?php $this->load->view('include/pagetoptodo', $pendingtask); ?>
is where your error is: the second parameter needs to be an array. So:
?php $this->load->view('include/pagetoptodo', array('pendingtask'=>$pendingtask)); ?>
in order to pass to a sub-view
In Your pagetopnavigation view page you used the variable "$pendingtask"
(<?php $this->load->view('include/pagetoptodo', $pendingtask); ?>)
The error what you are getting is a Notice => it is saying the variable($pendingtask) is not defined in your code ; it will not stop the execution of file, you can stop "Notice and Warning" messages by using error_reporting method or you can set up this in Codeigniter configurations, check this link for reference : http://phpdog.blogspot.in/2012/02/codeigniter-error-reporting-handling.html