Binding Repeater data to Dynamic tab in asp.net - asp.net

I wanted to bind the repeater's data to Dynamic tab of year the image for which i am attaching
enter image description here
the repeater code is as below:
<!--begin isotope -->
<div class="isotope col-lg-12">
<!--begin portfolio filter -->
<ul id="filter" class="option-set clearfix">
<li data-filter="*" class="selected"><a>All</a></li>
<asp:Repeater ID="rpYear" runat="server" OnItemDataBound="rpYear_ItemDataBound">
<ItemTemplate>
<li data-filter='<%#Eval("Year") %>'>
<a>
<asp:Label ID="lbl" runat="server" Text='<%#Eval("Year") %>'></asp:Label>
</a>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
<ul id="list" class="portfolio_list clearfix">
<asp:Repeater ID="rpImagedetails" runat="server">
<ItemTemplate>
<li class="list_item col-lg-4 col-md-4 col-sm-4 <%#Eval("Year") %> ">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src='<%# "FileUpload/Eventpic/"+ Eval("Image") %>' alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5><%#Eval("Title") %></h5>
<span><%#Eval("Date") %>
<br>
<%#Eval("Stallno") %>
<br>
<%#Eval("Location") %></span>
</figcaption>
</figure>
</div>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
</div>
<!--./span12-->
</div>
the code behind file is as below:
protected void Page_Load(object sender, EventArgs e)
{
GetYear();
BindEventVideo1();
}
public void GetYear()
{
DataSet ds = EventVideo.GetYear();
if (ds.Tables[0].Rows.Count > 0)
{
rpYear.DataSource = ds;
rpYear.DataBind();
}
}
protected void rpYear_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
Repeater rpImages = (Repeater)e.Item.FindControl("rpImagedetails");
Label item = (Label)e.Item.FindControl("lbl");
string Year = item.Text;
ViewState["Year"] = Year;
}
}
public void BindEventVideo1()
{
DataSet ds = EventVideo.GetyearImages(ViewState["Year"].ToString());
if (ds.Tables[0].Rows.Count > 0)
{
rpImagedetails.DataSource = ds.Tables[0];
rpImagedetails.DataBind();
}
}
I am new to asp.net so kindly help.
Thanks in advance.
the Html code is
<div class="isotope col-lg-12">
<!--begin portfolio filter -->
<ul id="filter" class="option-set clearfix">
<li data-filter="*" class="selected">All</li>
<li data-filter=".2014">2014</li>
<li data-filter=".2012">2012</li>
<!-- <li data-filter=".2011">2011</li>-->
<li data-filter=".2010">2010</li>
</ul>
<!--end portfolio filter -->
<!--begin portfolio_list -->
<ul id="list" class="portfolio_list clearfix">
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2014">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2014-1.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2014</h5>
<span>Date : 8th - 12th Jan '2014. <br>
Stall No: H2A55
<br>
BIEC,
Bangalore, India</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2014">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2014-2.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2014</h5>
<span>Date : 8th - 12th Jan '2014. <br>
Stall No: H2A55
<br>
BIEC,
Bangalore, India</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<!--<li class="list_item col-lg-4 col-md-4 col-sm-4 2012">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="img/portfolio/portfolio_2.png" alt="" />
<div class="hovers">
</i>
<i class="fa fa-link"></i>
</div>
</div>
<figcaption class="item-description">
<h5>Power & Electricity World Africa 2012</h5>
<span>Date : 27th - 28th March '2012<br>
Stall No: ZNB-9 IND 10,
Sandton Convention Centre,
Johannesburg, South Africa</span>
</figcaption>
</figure>
</div>
</li>-->
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2012">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2012-1.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2012</h5>
<span>Date : 18th - 22nd Jan'2012<br>
Stall No: H5 E10R70<br>
Bombay Exhibition Centre,
Mumbai, INDIA</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2012">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2012-2.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2012</h5>
<span>Date : 18th - 22nd Jan'2012<br>
Stall No: H5 E10R70<br>
Bombay Exhibition Centre,
Mumbai, INDIA</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2012">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2012-3.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2012</h5>
<span>Date : 18th - 22nd Jan'2012<br>
Stall No: H5 E10R70<br>
Bombay Exhibition Centre,
Mumbai, INDIA</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<!--<li class="list_item col-lg-4 col-md-4 col-sm-4 2012">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="img/portfolio/portfolio_4.png" alt="" />
<div class="hovers">
</i>
<i class="fa fa-link"></i>
</div>
</div>
<figcaption class="item-description">
<h5>Middle East Electricity 2012</h5>
<span>Date : 7th - 9th Feb'2012<br>
Stall No: ZN 18
India Pavalion <br>
International Exhibition Centre,
Dubai, UAE</span>
</figcaption>
</figure>
</div>
</li>-->
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<!--<li class="list_item col-lg-4 col-md-4 col-sm-4 2011">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="img/portfolio/portfolio_5.png" alt="" />
<div class="hovers">
</i>
<i class="fa fa-link"></i>
</div>
</div>
<figcaption class="item-description">
<h5>Middle East Electricity 2011</h5>
<span>Date : 8th - 10th Feb'2011<br>
Stall No: ZQ 58,
India Pavalion <br>
International Exhibition Centre,
Dubai, UAE</span>
</figcaption>
</figure>
</div>
</li>-->
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2010">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2010-1.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!--<i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2010</h5>
<span>Date : 20th - 24th Jan'2010<br>
Stall No: H1 G50<br>
Bombay Exhibition Centre,
Mumbai, INDIA</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2010">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2010-2.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!-- <i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2010</h5>
<span>Date : 20th - 24th Jan'2010<br>
Stall No: H1 G50<br>
Bombay Exhibition Centre,
Mumbai, INDIA</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<li class="list_item col-lg-4 col-md-4 col-sm-4 2010">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="images/events/2010-3.jpg" alt="" />
<div class="hovers">
<i class="fa fa-search"></i>
<!-- <i class="fa fa-link"></i>-->
</div>
</div>
<figcaption class="item-description">
<h5>Elecrama 2010</h5>
<span>Date : 20th - 24th Jan'2010<br>
Stall No: H1 G50<br>
Bombay Exhibition Centre,
Mumbai, INDIA</span>
</figcaption>
</figure>
</div>
</li>
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<!--<li class="list_item col-lg-4 col-md-4 col-sm-4 responsive">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="img/portfolio/portfolio_7.png" alt="" />
<div class="hovers">
</i>
<i class="fa fa-link"></i>
</div>
</div>
<figcaption class="item-description">
<h5>consectetur adipisicing</h5>
<span>Technology</span>
</figcaption>
</figure>
</div>
</li>-->
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<!--<li class="list_item col-lg-4 col-md-4 col-sm-4 branding">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="img/portfolio/portfolio_8.png" alt="" />
<div class="hovers">
</i>
<i class="fa fa-link"></i>
</div>
</div>
<figcaption class="item-description">
<h5>ipsum dolor</h5>
<span>Technology</span>
</figcaption>
</figure>
</div>
</li>-->
<!-- End Portfolio item -->
<!-- Begin Portfolio item -->
<!--<li class="list_item col-lg-4 col-md-4 col-sm-4 branding">
<div class="recent-item">
<figure>
<div class="touching medium">
<img src="img/portfolio/portfolio_9.png" alt="" />
<div class="hovers">
</i>
<i class="fa fa-link"></i>
</div>
</div>
<figcaption class="item-description">
<h5>lorem ipsum</h5>
<span>Technology</span>
</figcaption>
</figure>
</div>
</li>-->
<!-- End Portfolio item -->
</ul> <!--end portfolio_list -->
</div>
Adding the Image from view code
enter image description here

I think you need 2 repeater if you are using ASP.NET(aspx and ascx)
1) for displaying year as a tab
2) another repeater for displaying images with details
Step-to-follow
1) Have this all data in dataset set in session
2) get distinct year and add default tab as 'All' and bind this year data to Repeater as horizontal, each repeater cell contains the link button and on click you have to redirect to server and get the filtered records from the session dataset and show it on 2nd repeater
2)on each 1st repeater-link button click event- get the year and filter out the records from session database and create in-memory dataset and fill it and bind it to 2nd dataset

I finally figured out the reason for it.
<ul id="filter" class="option-set clearfix">
<li data-filter="*" class="selected"><a>All</a></li>
<asp:Repeater ID="rpYear" runat="server">
<ItemTemplate>
<li data-filter=".<%#Eval("Year") %>"><%#Eval("Year") %></li>
</ItemTemplate>
</asp:Repeater>
</ul>
In earlier Question i was missing anchor tag section ,so it was not able to target to repeater and also In this <%#Eval("Year") %> i missed out DOT(.) representing the class.

Related

Spread out Bootstrap images with captions within a column

I have a pricing comparison section of a Bootstrap 5 website, one column displays the images perfectly (without captions), however whenever I add a paragraph tag for the caption, the images stack on top of one another instead of staying inline in a row.
Here is the code for images without captions:
<div class="col-lg-4 col-md-6" data-aos="zoom-in" data-aos-delay="150">
<div class="box">
<h3>Basic</h3>
<h4><sup>£</sup>4.50<span> / month</span></h4>
<ul>
<li><i class="bi bi-check-circle"></i>Web and mobile versions of Office apps only</li>
<li><i class="bi bi-check-circle"></i>Chat, call, meet up to 300 attendees</li>
<li><i class="bi bi-check-circle"></i>1 TB of cloud storage per user</li>
<li><i class="bi bi-check-circle"></i>Business-class email</li>
<li><i class="bi bi-check-circle"></i>Standard security</li>
<li><i class="bi bi-check-circle"></i>Anytime phone and web support</li>
</ul>
<p>Web and mobile apps and services:</p>
<img src="assets/img/Word_64x64.png" alt="" class="img-fluid">
<img src="assets/img/Excel_64x64.png" alt="" class="img-fluid">
<img src="assets/img/Outlook_64x64.png" alt="" class="img-fluid">
<img src="assets/img/PowerPoint_64x64.png" alt="" class="img-fluid">
<img src="assets/img/Microsoft_Teams_64x64.png" alt="" class="img-fluid">
<img src="assets/img/Outlook_64x64.png" alt="" class="img-fluid">
<img src="assets/img/Exchange_64x64.png" alt="" class="img-fluid">
<img src="assets/img/OneDrive_64x64.png" alt="" class="img-fluid">
<img src="assets/img/SharePoint_64x64.png" alt="" class="img-fluid">
<div class="btn-wrap">
Buy Now
</div>
</div>
</div>
Here is the code for images with captions:
<div class="col-lg-4 col-md-6 mt-4 mt-lg-0" data-aos="zoom-in" data-aos-delay="150">
<div class="box featured">
<h3>Premium</h3>
<h4><sup>£</sup>16.60<span> / month</span></h4>
<b><p>Everything in Business Standard, plus:</p></b>
<ul>
<li><i class="bi bi-check-circle white"></i>Advanced security
<li><i class="bi bi-check-circle white"></i>Access and data control
<li><i class="bi bi-check-circle white"></i>Cyberthreat protection</li>
<li><i class="bi bi-check-circle white"></i>Mobile device management</li>
</ul>
<p>Desktop, web, and mobile apps and services:</p>
<img src="assets/img/Excel_64x64.png" alt="" class="img-fluid"><p>Excel</p>
<img src="assets/img/Outlook_64x64.png" alt="" class="img-fluid"><p>Outlook</p>
<img src="assets/img/PowerPoint_64x64.png" alt="" class="img-fluid"><p>PowerPoint</p>
<img src="assets/img/Microsoft_Teams_64x64.png" alt="" class="img-fluid"><p>Teams</p>
<img src="assets/img/Outlook_64x64.png" alt="" class="img-fluid"><p>Outlook</p>
<img src="assets/img/Exchange_64x64.png" alt="" class="img-fluid"><p>Exchange</p>
<img src="assets/img/OneDrive_64x64.png" alt="" class="img-fluid"><p>OneDrive</p>
<img src="assets/img/SharePoint_64x64.png" alt="" class="img-fluid"><p>SharePoint</p>
<img src="assets/img/Access_64x64.png" alt="" class="img-fluid"><p>Access</p>
<img src="assets/img/Publisher_64x64.png" alt="" class="img-fluid"><p>Publisher</p>
<div class="btn-wrap">
Buy Now
</div>
</div>
</div>
What do I need to change to keep the icons inline?
Try wrapping your <img> and the <p> inside a <div>. Since <p> is a block-level element, meaning that any element after <p> will automatically be added to a new line.
Here's my example
<div>
<img/>
<span>your text here</span>
</div>
Also note that I'm changing <p> with <span>
Update code
To centre all the content
<div class="d-flex flex-wrap align-items-center justify-content-center">
...
</div>
Try to use the flex property of bootstrap
<div class="d-flex flex-column align-items-center justify-content-center">
<img/>
<p>your text here</p>
</div>
for more details check out the bootstrap doc[https://getbootstrap.com/docs/5.0/utilities/flex/]
and You can wrap all the image div with flex-wrap
<div class="d-flex flex-wrap">
...
</div>

Bootstrap modal show wrong information

I have a strange issue with a bootstrap carousel I've implemented in a vue wordpress theme.
I want to show some featured products and I've used a v-for loop to iterate some different arrays, and this seems working. The problem is when I want to load the product details of an item of the carousel, The modal I've implemented that will be opened when an item is clicked, will show the wrong information, but the information in the carousel are correct.
Here is the code I'm using to show the carousel
<div id="caroselloCatalogo" class="carousel slide mt-4 mb-4" data-bs-ride="carousel">
<div class="carousel-inner">
<!-- -->
<div class="carousel-item active">
<div class="row m-0">
<!-- TOFIX VISUALIZZARE PRODOTTO CORRETTO -->
<div class="col-md-4 col-lg-4" v-for="(product, i) in store.featuredPescheria" :key="i">
<a href="#" class="text-decoration-none stretched-link" #click.prevent="showFeaturedProduct(product)" data-bs-target="#featuredModal" data-bs-toggle="modal">
<div class="card">
<div class="row m-0">
<div class="col-md-5 col-lg-5 p-0">
<img src="http://localhost/iperfutura-prenotazioni/wp-content/uploads/2022/10/600.png" class="card-img-top">
</div>
<div class="col-md-7 col-lg-7">
<div class="card-body">
<h5 class="card-title text-uppercase m-0" id="featuredCardTitle">
{{ product.prodName }}
</h5>
<p class="card-text text-uppercase m-0">
{{ product.prodPrice }} {{ product.prodUnit }}
</p>
<small class="text-uppercase">Cod. {{ product.prodCode }}</small>
<a href="#" class="text-uppercase text-decoration-none" id="featuredProductLink" #click.prevent="showFeaturedProduct(product)">
Visualizza prodotto
</a>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
<!-- -->
<div class="carousel-item">
<div class="row m-0">
<div class="col-md-4 col-lg-4" v-for="(product, i) in store.featuredGastronomia" :key="i">
<a href="#" class="text-decoration-none stretched-link" #click.prevent="showFeaturedProduct(product)" data-bs-target="#featuredModal" data-bs-toggle="modal">
<div class="card">
<div class="row m-0">
<div class="col-md-5 col-lg-5 p-0">
<img src="http://localhost/iperfutura-prenotazioni/wp-content/uploads/2022/10/600.png" class="card-img-top" alt="" id="">
</div>
<div class="col-md-7 col-lg-7">
<div class="card-body">
<h5 class="card-title text-uppercase m-0" id="featuredCardTitle">
{{ product.prodName }}
</h5>
<p class="card-text text-uppercase m-0">
{{ product.prodPrice }} {{ product.prodUnit }}
</p>
<a href="#" class="text-uppercase text-decoration-none" id="featuredProductLink" #click.prevent="showFeaturedProduct(product)">
Visualizza prodotto
</a>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
<!-- -->
<div class="carousel-item">
<div class="row m-0">
<div class="col-md-4 col-lg-4" v-for="(product, i) in store.featuredPasticceria" :key="i">
<a href="#" class="text-decoration-none stretched-link" #click.prevent="showFeaturedProduct(product)" data-bs-target="#featuredModal" data-bs-toggle="modal">
<div class="card">
<div class="row m-0">
<div class="col-md-5 col-lg-5 p-0">
<img src="http://localhost/iperfutura-prenotazioni/wp-content/uploads/2022/10/600.png" class="card-img-top" alt="" id="">
</div>
<div class="col-md-7 col-lg-7">
<div class="card-body">
<h5 class="card-title text-uppercase m-0" id="featuredCardTitle">
{{ product.prodName }}
</h5>
<p class="card-text text-uppercase m-0">
{{ product.prodPrice }} {{ product.prodUnit }}
</p>
<a href="#" class="text-uppercase text-decoration-none" id="featuredProductLink" #click.prevent="showFeaturedProduct(product)">
Visualizza prodotto
</a>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
<!-- -->
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#caroselloCatalogo" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#caroselloCatalogo" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
I'm getting the information from the WP rest api, and after that all the available products are fetched, I'm using slice to limit the numbers of products that each array will hold
this.store.featuredGastronomia = this.store.gastronomia.slice(0, 3)
When a product is clicked, I'm calling this method to assign to a variable all the needed information
showFeaturedProduct(product){
console.log(product)
this.showOffacnvas = true
this.featuredProduct = product
},
dismissFeaturedProduct(){
this.featuredProduct = {}
this.showOffacnvas = false
}
What's wrong with the carousel code and why the modal data are wrong?

Redirecting to a particular page

`<!DOCTYPE html>
<html class="no-js">
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" type="image/png" href="images/favicon.png">
<title>Timer Agency Template</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<!-- Mobile Specific Metas
================================================== -->
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Template CSS Files
================================================== -->
<!-- Twitter Bootstrs CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Ionicons Fonts Css -->
<link rel="stylesheet" href="css/ionicons.min.css">
<!-- animate css -->
<link rel="stylesheet" href="css/animate.css">
<!-- Hero area slider css-->
<link rel="stylesheet" href="css/slider.css">
<!-- owl craousel css -->
<link rel="stylesheet" href="css/owl.carousel.css">
<link rel="stylesheet" href="css/owl.theme.css">
<link rel="stylesheet" href="css/jquery.fancybox.css">
<!-- template main css file -->
<link rel="stylesheet" href="css/main.css">
<!-- responsive css -->
<link rel="stylesheet" href="css/responsive.css">
<!-- Template Javascript Files
================================================== -->
<!-- modernizr js -->
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<!-- jquery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- owl carouserl js -->
<script src="js/owl.carousel.min.js"></script>
<!-- bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<!-- wow js -->
<script src="js/wow.min.js"></script>
<!-- slider js -->
<script src="js/slider.js"></script>
<script src="js/jquery.fancybox.js"></script>
<!-- template main js -->
<script src="js/main.js"></script>
</head>
<body>
<!--
==================================================
Header Section Start
================================================== -->
<header id="top-bar" class="navbar-fixed-top animated-header">
<div class="container">
<div class="navbar-header">
<!-- responsive nav button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- /responsive nav button -->
<!-- logo -->
<div class="navbar-brand">
<a href="index.html" >
<img src="images/logo.png" alt="">
</a>
</div>
<!-- /logo -->
</div>
<!-- main menu -->
<nav class="collapse navbar-collapse navbar-right" role="navigation">
<div class="main-menu">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="index.html" >Home</a>
</li>
<li>Sign Up</li>
<li>Log In</li>
<li>Contact</li>
</ul>
</div>
</nav>
<!-- /main nav -->
</div>
</header>
<!--
==================================================
Slider Section Start
================================================== -->
<section id="hero-area" >
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<div class="block wow fadeInUp" data-wow-delay=".3s">
<!-- Slider -->
<section class="cd-intro">
<h1 class="wow fadeInUp animated cd-headline slide" data-wow-delay=".4s" >
<span>EMPLOYEE TRAINING PROGRAMME</span><br>
<span class="cd-words-wrapper">
<b class="is-visible">(ETP)</b>
<b>DEVELOPER</b>
<b>FATHER</b>
</span>
</h1>
</section> <!-- cd-intro -->
<!-- /.slider -->
<a class="btn-lines dark light wow fadeInUp animated smooth-scroll btn btn-default btn-green" data-wow-delay=".9s" href="#works" data-section="#works" >View Programmes</a>
</div>
</div>
</div>
</div>
</section><!--/#main-slider-->
<!--
==================================================
Slider Section Start
================================================== -->
<section id="about">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="block wow fadeInLeft" data-wow-delay=".3s" data-wow-duration="500ms">
<h2>
ABOUT THE COMPANY
</h2>
<p>
Persistent Systems is a technology services company which was incorporated on 16 May 1990 as Persistent Systems Private Limited. It was subsequently converted into a public Limited company on 17 September 2010 with the name Persistent Systems Limited and a new certificate of incorporation was issued on 28 September 2007 from the RoC.
</p>
</div>
</div>
<div class="col-md-6 col-sm-6">
<div class="block wow fadeInRight" data-wow-delay=".3s" data-wow-duration="500ms">
<img src="images/about/about.jpg" alt="">
</div>
</div>
</div>
</div>
</section> <!-- /#about -->
<!--
==================================================
Portfolio Section Start
================================================== -->
<section id="works" class="works">
<div class="container">
<div class="section-heading">
<h1 class="title wow fadeInDown" data-wow-delay=".3s">Available Programmes</h1>
<p class="wow fadeInDown" data-wow-delay=".5s">
The following programmes are available for our employees..
</p>
</div>
<div class="row">
<div class="col-sm-4 col-xs-12">
<figure class="wow fadeInLeft animated portfolio-item" data-wow-duration="500ms" data-wow-delay="0ms">
<div class="img-wrapper">
<img src="images/portfolio/item-1.jpg" class="img-responsive" alt="this is a title" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="service.html">Enroll for Selenium</a>
</div>
</div>
</div>
<figcaption>
<h4>
<a href="#">
Selenium
</a>
</h4>
<p>
Automated software testing tool
</p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 col-xs-12">
<figure class="wow fadeInLeft animated" data-wow-duration="500ms" data-wow-delay="300ms">
<div class="img-wrapper">
<img src="images/portfolio/item-2.jpg" class="img-responsive" alt="this is a title" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="service.html">Enroll for Robotium</a>
</div>
</div>
</div>
<figcaption>
<h4>
<a href="#">
Robotium
</a>
</h4>
<p>
Automation testing framework (Android) </p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 col-xs-12">
<figure class="wow fadeInLeft animated" data-wow-duration="500ms" data-wow-delay="300ms">
<div class="img-wrapper">
<img src="images/portfolio/item-3.jpg" class="img-responsive" alt="" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="service.html">Enroll for TestComplete</a>
</div>
</div>
</div>
<figcaption>
<h4>
<a href="#">
TestComplete
</a>
</h4>
<p>
Open testing platform
</p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 col-xs-12">
<figure class="wow fadeInLeft animated" data-wow-duration="500ms" data-wow-delay="600ms">
<div class="img-wrapper">
<img src="images/portfolio/item-4.jpg" class="img-responsive" alt="" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="service.html">Enroll for SoapUI</a>
</div>
</div>
</div>
<figcaption>
<h4>
<a href="#">
SoapUI
</a>
</h4>
<p>
Web service testing application
</p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 col-xs-12">
<figure class="wow fadeInLeft animated" data-wow-duration="500ms" data-wow-delay="900ms">
<div class="img-wrapper">
<img src="images/portfolio/item-5.jpg" class="img-responsive" alt="" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="service.html">Enroll for QTP(HP)</a>
</div>
</div>
</div>
<figcaption>
<h4>
<a href="#">
QTP
</a>
</h4>
<p>
Automated functional testing tool
</p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 col-xs-12">
<figure class="wow fadeInLeft animated" data-wow-duration="500ms" data-wow-delay="1200ms">
<div class="img-wrapper">
<img src="images/portfolio/item-6.jpg" class="img-responsive" alt="" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="service.html">Enroll for TestDrive</a>
</div>
</div>
</div>
<figcaption>
<h4>
<a href="#">
TestDrive
</a>
</h4>
<p>
Automated software quality solution
</p>
</figcaption>
</figure>
</div>
</div>
</div>
</section> <!-- #works -->
<!--
==================================================
Portfolio Section Start
================================================== -->
<section id="feature">
<div class="container">
<div class="section-heading">
<h1 class="title wow fadeInDown" data-wow-delay=".3s">BENEFITS</h1>
<p class="wow fadeInDown" data-wow-delay=".5s">
The benefits of the programme are clearly very high.<br>The programme empowers you with new ways for quality software development.
</p>
</div>
<div class="row">
<div class="col-md-4 col-lg-4 col-xs-12">
<div class="media wow fadeInUp animated" data-wow-duration="500ms" data-wow-delay="300ms">
<div class="media-left">
<div class="icon">
<i class="ion-ios-flask-outline"></i>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">Better product quality
</h4>
<p>After the programme,the products you generate will see a rise in quality.</p>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4 col-xs-12">
<div class="media wow fadeInDown animated" data-wow-duration="500ms" data-wow-delay="600ms">
<div class="media-left">
<div class="icon">
<i class="ion-ios-lightbulb-outline"></i>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">Client satisfaction
</h4>
<p>Better quality products will automatically lead to better client satisfaction</p>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4 col-xs-12">
<div class="media wow fadeInDown animated" data-wow-duration="500ms" data-wow-delay="900ms">
<div class="media-left">
<div class="icon">
<i class="ion-ios-lightbulb-outline"></i>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">Work reduction
</h4>
<p>The programme will allow you to generate products in a complete new mannner thus reducing your work.</p>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4 col-xs-12">
<div class="media wow fadeInDown animated" data-wow-duration="500ms" data-wow-delay="1200ms">
<div class="media-left">
<div class="icon">
<i class="ion-ios-americanfootball-outline"></i>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">Easier development
</h4>
<p>Development of new products will now be easier than ever before.</p>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4 col-xs-12">
<div class="media wow fadeInDown animated" data-wow-duration="500ms" data-wow-delay="1500ms">
<div class="media-left">
<div class="icon">
<i class="ion-ios-keypad-outline"></i>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">Increased work rate
</h4>
<p>New methods will allow you to work at a faster pace thus increasing your work rate.</p>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4 col-xs-12">
<div class="media wow fadeInDown animated" data-wow-duration="500ms" data-wow-delay="1800ms">
<div class="media-left">
<div class="icon">
<i class="ion-ios-barcode-outline"></i>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">Skill upgradation</h4>
<p>Last but not the least,you will have a new set of skills completely industry relevant.</p>
</div>
</div>
</div>
</div>
</div>
</section> <!-- /#feature -->
<!--
==================================================
Call To Action Section Start
================================================== -->
<section id="call-to-action">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="block">
<h2 class="title wow fadeInDown" data-wow-delay=".3s" data-wow-duration="500ms">STILL THINKING?</h1>
<p class="wow fadeInDown" data-wow-delay=".5s" data-wow-duration="500ms">Stop thinking. Begin now. The later you begin, the more you will be left behind.</p>
Contact With Me
</div>
</div>
</div>
</div>
</section>
<!--
==================================================
Footer Section Start
================================================== -->
<footer id="footer">
<div class="container">
<div class="col-md-8">
<p class="copyright">Copyright: <span>2015</span> . `enter code here`Design and Developed by Themefisher</p>
</div>
<div class="col-md-4">
<!-- Social Media -->
<ul class="social">
<li>
<a href="https://www.facebook.com/PersistentSystems/" target="_blank"class="Facebook">
<i class="ion-social-facebook"></i>
</a>
</li>
<li>
<a href="https://twitter.com/Persistentsys?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank" class="Twitter">
<i class="ion-social-twitter"></i>
</a>
</li>
<li>
<a href="https://www.linkedin.com/company/persistent-systems" class="Linkedin" target="_blank">
<i class="ion-social-linkedin"></i>
</a>
</li>
</ul>
</div>
</div>
</footer> <!-- /#footer -->
</body>
</html>
I am currently working on a web project where if the user wants to enroll for a particular program the user clicks on enroll and they are redirected to the log in page. but I want that they should be automatically redirected to their profile pages if they are already logged in.What should I do.Also I am a newbie to stackoverflow so I don't know how to present my code here.If someone would tell me how to do so I am totally open to do it.
You have to test in PHP if your user is logged into your website.
session_start();
if(isset($_SESSION['isLogged'])){
header('Location: profil.php');
exit;
}
else {
header('Location: login.php');
exit;
}
I suppose you don't know a lot PHP, so you should have a look to how create a membership and use PHP sessions :-)
https://code.tutsplus.com/tutorials/user-membership-with-php--net-1523
well you need to check your if session or if cookie exists and is not expired .... if they exist then you redirect before the whole page is loaded (server Logic) ... as i dont know what language you have written you server logic in i cant help you with the code
After user is logged-in generate a user token and store it in a cookie when ever user redirect to login-page use jquery/javascript to check the cookie then from there you can decide whether user should stay in login-page or redirect to profile page.
You can post your code by pasting in the editor and select the code then click on {} this symbol

Wordpress Alternative Post Column

I want to add the wordpress post loop with posts from category-name feature to it, for alternative column. Here is the image sample of what i am trying to achieve, and below the image is the html i have built to work it, thanks.
here is the image sample
here is my code
<div class="row featured">
<div class="grid-box grid-box-1 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/video-post/">
<div class="caption">
<div class="cat"><span>News</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
<i class="fa fa-video-camera"></i> Video
</div>
<h2 class="title">Video Post with Featured Image</h2> </div>
<div class="quad wp-post-image"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>
<div class="grid-box grid-box-2 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/post-with-more-tag/">
<div class="caption">
<div class="cat"><span>Lifestyle</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
<i class="fa fa-video-camera"></i> Video
</div>
<h2 class="title">Post With More Tag</h2>
</div>
<div class="vm-featured"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>
<div class="grid-box grid-box-3 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/vimeo-video-post/">
<div class="caption">
<div class="cat"><span>What's New</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
</div>
<h2 class="title">Vimeo Video Post</h2>
</div>
<div class="quad wp-post-image"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>
<div class="grid-box grid-box-4 item-featured">
<a href="http://www.marchettidesign.net/fullby/demo-biggrid/2015/01/26/post-with-image-and-text/">
<div class="caption">
<div class="cat"><span>News</span></div>
<div class="date-feat"><i class="fa fa-clock-o"></i> 26 Jan , 2015
</div>
<h2 class="title">Post with Image and text</h2>
</div>
<div class="quad wp-post-image"> <img src="/asstes/image1.jpg"/> </div>
</a>
</div>

Why is the col-md-4 column starting from the right and leaving a blank space on next line

I am displaying a list of search results. I am using col-md-4 from bootstrap to display 3 results per row - a bit like 3 cards. However when it moves to the next row it starts from the right and then the next item shows up only on the next one left... basically jumping a column.
Following code to be repeated as many time as needed. End goal is to display results like a grid.
<div class="outer-listings-container row-space-8">
<div class="row row-condensed listings-container">
<!-- PART TO REPEAT -->
<div class="col-md-4 row-space-1" data-id="36">
<div class="result">
<div class="panel-image listing-img">
<div id="36" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="item active">
<a class="center-block" href="#">
<div class="center-block">
<img class="img-responsive center-block" src="#"> </div>
</a>
</div>
<div class="item">
<a class="" href="#">
<div class="center-block">
<img class="img-responsive center-block" src="#">
</div>
</a>
</div>
</div>
<div>
<a class="left carousel-control height-test" id="36" href="#36" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
</div>
<div>
<a class="right carousel-control height-test" id="36" href="#36" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="panel-overlay-bottom-left panel-overlay-label panel-overlay-listing-label">
<div>
<sup class="h6">€</sup>
<span class="h3">456</span>
<sup class="h6">EUR</sup>
<span class="h6">/session of 2 hours</span>
</div>
</div>
</div>
<div class="panel-body panel-body-result">
<h4>
<div class="row">
<div class="col-xs-2">
<img src="#" class="avatar-sm" alt="Banana"> </div>
<div class="col-xs-10">
Banana R
<br>
<small>Banana R</small>
</div>
</div>
</h4>
<span class="stars2"><span style="width: 0px;"></span></span>
<span><b class="review_score">0</b> (0 reviews)</span>
<p>blabla</p>
<p>more blabla </p>
</div>
</div>
</div>
<!-- END REPEAT -->
</div>
</div>
Problem can be seen on the following page: https://gokyma.com/search?location=Paris%2C+France&country=FR&city=Paris&state=IDF&stype=5&selected_date=&selected_time=&_token=ZHXfiseRlAgE3fLY0f1ywr7qYzj9eFxGkSZ2SFIS
Well, your jsfiddle code is not really representative of the issue, but I guess one solution could be adding <div class="row"></div> for each series of 3 col-md-4 that you have in each line. So, the snippet would look something like this;
<row> <col-md-4> <col-md-4> <col-md-4> </row>
Remember, a row can't contain more than 12 columns.... that's another thing to take into consideration...

Resources