Dynamic page within a dynamic generated page - php

So I already have a main page then dynamic pages. But I want to know how to generate a dynamic page within a the generated page. For example, www.whatever.com/something.php?q=something?p=something
I want to make the dynamic page contain other dynamic pages within so I can switch out content in that page.
Any ideas?
So this page is done by www.website.com/folder/main.php?c=page1, in this div I want to do other content
<div class="col s9 grey right">
<!-- Teal page content -->
<div class="card-panel z-depth-2">
<div class="row center">
<div class="col s12">
<?php include 'content.php';?>
</div><!---panel personal stats---->
</div><!---profile container row--->
</div>
</div>
Within that url I'm trying to get something like this
www.website.com/folder/main.php?c=page1/content/content?q=othercontent

$_GET
Search in internet $_GET and Url parameters, i.e. GET URL parameter in PHP
<div class="col s9 grey right">
<!-- Teal page content -->
<div class="card-panel z-depth-2">
<div class="row center">
<div class="col s12">
<?php include 'content.php';
if ($_GET['c'] == 'page') {
echo 'Ala ma kotA';
} else {
echo 'Ala nie ma kotA';
}
?>
</div><!---panel personal stats---->
</div><!---profile container row--->

Related

joomla 4 Blog category is not balanced correctly

I created a blog category from the menu. In Joomla 4 -> In Blog Layout -> Columns ، I can give a value to the column, but if we increase the value by one, the displayed contents are not balanced. And the "" did not close properly. After a general search, I realized that the contents are arranged as follows :
HTML :
<div class="blog-items">
<div class="blog-item">
<div class="content">1</div>
<div class="blog-item">
<div class="content">2</div>
</div>
<div class="blog-item">
<div class="content">3</div>
<div class="blog-item">
<div class="content">4</div>
<div class="blog-item">
<div class="content">5</div>
</div>
<div class="blog-item">
<div class="content">6</div>
</div>
<div class="blog-item">
<div class="content">7</div>
</div>
</div>
</div>
</div>
</div>
HTML The right way to be :
<div class="blog-items">
<div class="blog-item"><div class="content">1</div></div>
<div class="blog-item"><div class="content">2</div></div>
<div class="blog-item"><div class="content">3</div></div>
<div class="blog-item"><div class="content">4</div></div>
<div class="blog-item"><div class="content">5</div></div>
<div class="blog-item"><div class="content">6</div></div>
<div class="blog-item"><div class="content">7</div></div>
</div>
Note: When I disable "loadTemplate", the loop is displayed correctly and the divisions are closed correctly.
I also checked the information inside the "$this->loadTemplate('item')" but found no problem.
PHP :
<div class="blog-items">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<div class="blog-item">
<?php
$this->item = & $item;
echo $this->loadTemplate('item'); //Included <div class="content">value</div>
?>
</div>
<?php endforeach; ?>
</div>
it's true,fixed.
All content had a tag before page break,
You cannot insert it inside a div. The closing tag will be missing. Close the tag before inserting Read More.
Little did I know that using before page break can be so destructive, and I've been looking for problems with PHP code for about a week now.

How to load hidden <div> on click

I am designing a front-end login/signup page by using html and materialize css. The features that I am trying to include are:
a tab view inside a card with an unordered list with two items:
"Login" (<a href="#login">), and
"SignUp" (<a href="#signup">).
Two separate content areas with their own id: "login" and "signup"
My goal is to have the "id=login" content load when a user clicks Login, and likewise "id=signup" content to load on clicking SignUp but that's not working. As the image shows, both the tab view and both content "cards" are displayed.
Screenshot
This is my code
<div class="row">
<div class="col l6 offset-l3 m8 offset-m2 s12">
<div class="card-panel center">
<ul class="tabs">
<li class="tab">Login</li>
<li class="tab">Sign Up</li>
</ul>
</div>
</div>
<!-- Login content area -->
<div class="col l6 offset-l3 m8 offset-m2 s12" id="login">
<div class="card-panel center">
</div>
</div>
<!-- Sign Up content area -->
<div class="col l6 offset-l3 m8 offset-m2 s12" id="signup">
<div class="card-panel center">
</div>
</div>
<!-- row ends here -->
</div>

PHP Passing Variable on the Same Page

I am creating a project on PHP. But I have a problem. I want to pass some values from a section to another section. For example: In first section I am showing all products, and second section I am showing product details. When I click a product on first section, products values should pass second section. I am sharing my codes. Thanks
First Section
<section class="section pb-60 sm-pt-90">
<!-- Portfolio Items -->
<div id="portfolio-gallery" class="portfolio-container isotope-container portfolio-gallery row animated mfp-gallery" data-animation="fadeInUp" data-animation-delay="1200">
<article class="portfolio-item isotope-item col-md-4 col-sm-6 tasarim">
<div class="project-container">
<a href="http://blogaktuel.com//upload/Ekran Alıntısı.PNG" data-size="1080x1440" class="portfolio-gallery__img--main">
<img src="http://blogaktuel.com//upload/Ekran Alıntısı.PNG" alt="" style="width:360px; height:256px;">
<div class="overlay">
<div class="overlay-wrapper">
<div class="overlay-inner background-dark-5 opacity-70"></div>
</div>
</div>
</a>
<div class="project-details">
<h4 class="project-title heading-uppercase">Yeni Proje Mesela</h4>
</div>
</div>
</article>
Second Section
<div id="detay" class="ed-slide">
<div class="slide-container">
<div class="slide-content">
<section class="section sm-pt-0">
<div class="container">
<h2 class="text-white text-center animated" data-animation="fadeInDown"><!-- Project Title --></h2>
<div class="divider divider-alt divider-center divider-light animated" data-animation="fadeInDown" data-animation-delay="300"><span></span></div>
<p class="lead text-white mb-50 text-center animated" data-animation="fadeInDown" data-animation-delay="600"><!-- Project Info --></p>
<!-- Project Images etc. -->
</div>
</section>
</div>
</div>
</div>
You can make that using 2 ways:
-First way: when clicking on a product, you reload the page, and you pass the id in the url, and you display the data in the other section.
-Second way(Best way): via jquery for example, when clicking on a product, you load the data for this product and you display it in the other section.
I solved my problem with jQuery. I am sharing jQuery codes.
$(".details").click(function(){
var proje_baslik = $("input[name=proje_baslik]").val();
var proje_aciklama = $("input[name=proje_aciklama]").val();
var proje_url = $("input[name=proje_url]").val();
var proje_fiyat = $("input[name=proje_fiyat]").val();
var proje_resim = $("input[name=proje_resim]").val();
$("#detay .proje_baslik").html(proje_baslik);
$("#detay .proje_aciklama").html(proje_aciklama);
window.location.href = "http://localhost:81/Projeler/kodaktuelOnePage/#detay";});
Thanks for all comments

Get text from texteditor with laravel 5

I would like to get the html code of a texteditor.
I use this texteditor http://adminbootstrap.com/wb/right/0.3.0/texteditor.html .
I've a form with the texteditor inside it but when I would like to get the html code with:
$request->input('texteditor');
It doesn't work and whereas I gave a name to the texteditor,
What is going wrong?
My view code:
<form>
<div class="container-fluid half-padding">
<div class="pages pages_dashboard">
<div class="row">
<div class="col-md-12">
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">Contenu de l'actualitée</h3>
</div>
<div class="template template_texteditor">
<div class="summernote"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
And
<div class='summernote'></div>
dynamically creating other div and the html code is contained in
<div class='note-editable panel-body' name='texteditor'></div>
EDIT 1
Another way :
$('.summernote').summernote('code');
to get the entire html code of summernote texteditor
You currently have no textarea form field that is being sent back to the server that contains the wanted content.
The simple thing would be to change
<div class='note-editable panel-body' name='texteditor'></div>
to
<textarea class='note-editable panel-body' name='texteditor'></textarea>
or run some javascript on form submit to add this as post['textarea'] from the TEXT of the div content

Wordpress CSS Assistance with Column col-md-8 and Padding

Unfortunately I won't be able to describe my issue without a visit to my site. DadGab.com.
I have a 'featured slider' col-md-8 with a sidebar to the right. It appears there is some padding or spacing set somewhere and I am unable to find it. I've checked all theme files, style.php. All I am trying to do is move the sidebar on the right side to the top of the page. The empty space did used to be a col-md-4 container which the coding has since been removed.
If I remove the featured slider code from the main page, the 'latest' posts as well as the menu do move to the top of the screen without the padding issue.
Any help would be greatly appreciated.
you have the following structure
<div class="col-md-8"></div>
<div class="clear"></div>
<div class="col-md-8"></div>
<div class="col-md-4"></div>
if i understand you corectly you should have
<div class="col-md-8"></div>
<div class="col-md-4"></div>
so join the code from both .col-md-8 containers, remove the div with class "clear" and it should be OK. This is all done in template homepage.php
You have some problems in your layout logic. You need to think about the way columns and rows work.
You should have a left column (col-md-8) and a sidebar column (col-md-4) and they should be adjacent. The left column should contain ALL of the left content.
Here's what you have:
<div class="row">
<div class="col-md-8">
<!-- featured -->
</div>
<div class="clear"><!-- SEPARATION --></div>
<div class="col-md-8">
<!-- REAST OF LEFT COLUMN -->
</div>
<div class="col-md-4">
<!--
SIDEBAR
You want this next to the left column.
But it's not adjacent!
-->
</div>
</div>
Here's what you want
<div class="row">
<div class="col-md-8">
<!-- FEATURED -->
<!-- REST OF LEFT COLUMN -->
</div>
<div class="col-md-4">
<!-- RIGHT SIDEBAR -->
</div>
</div>
Your current scenario is following
<div class="col-md-8">
featured slider
</div>
<div class="col-md-8">
content
</div>
<div class="col-md-4">
sidebar
</div>
Change it to following
<div class="col-md-8">
featured slider
content
</div>
<div class="col-md-4">
sidebar
</div>
Please let me know if issue is still there :)
After your div "col-md-8" is coming a clearfix. Just creat a "col-md-4" after "col-md-8".
I already tested here, just do it.
Inside the tags
<div class="container"><div class="row">
rearrange the order, from:
<div class="col-md-8"> ... </div>
<div class="clear"></div>
<div class="col-md-8"> ... </div>
<div class="col-md-4"> ... </div>
to:
<div class="col-md-8"> ... </div>
<div class="col-md-4"> ... </div>
<div class="clear"></div>
<div class="col-md-8"> ... </div>
In addition, consider if you really want to keep the div that clears out your floats:
<div class="clear"></div>
If not, comment it out, like so:
<!-- <div class="clear"></div> -->
This indeed moves up your sidebar to the position you want. However, I suspect you will want the last div (of class col-md-8) to be positioned higher. If so, it sounds as if you will need to create two columns inside the row (the div of class row).

Categories