page&post in index

viriisxp
Sr. Bludit
Posts: 33
Joined: Sat Jul 02, 2016 6:01 pm

hello, i create a one page website with your beautifull system but i've include post in index but impossible to include page with.

please help me ;)
sarafereder
Jr. Bludit
Posts: 1
Joined: Sun Jul 03, 2016 1:12 pm

ضصثضصثضصثضصثضصثض
Last edited by sarafereder on Wed Aug 26, 2020 4:04 am, edited 13 times in total.
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

Hi,
here is a little tutorial to do it, https://docs.bludit.com/en/misc/embed-b ... my-website

You need to have Bludit v1.4 and the plugin API enabled.

Regards
viriisxp
Sr. Bludit
Posts: 33
Joined: Sat Jul 02, 2016 6:01 pm

omg, i'm terribly confuse ! i search on each page of the Docs but i think i miss this .

thx, i just have trouble to make it now :

for exemple, i have my page called : our-story
so i do this :

Code: Select all


<?php

$url = 'http://www.myhome.com/api/show/page/our-story';

$jsonData = file_get_contents($url);

$data = json_decode($jsonData, true);

foreach($data as $page) {

    $pagePermalink = $page['permalink'];

    echo $page['title'];

    echo '<a href="'.$pagePermalink.'">Link to page</a>';

    echo '<br>';
}

?>


but he don't work ;/
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

viriisxp wrote:but he don't work ;/
What will you do? What exactly have you done? What does not work? Can you please give the link to your installation?
viriisxp
Sr. Bludit
Posts: 33
Joined: Sat Jul 02, 2016 6:01 pm

hi, again : thx for your help

my installation is based on bludit 1.4 .

my home.php :

Code: Select all

	<a class="cd-nav-trigger cd-text-replace" href="#primary-nav">Menu<span aria-hidden="true" class="cd-icon"></span></a>
	<div class="cd-projects-container">
		<ul class="cd-projects-previews">
			<li>
				<a href="#0">
					<div class="cd-project-title">
						<h2>D&eacute;couvrez le club</h2>
						<p>Qu'est-ce que le club ?</p>
					</div>
				</a>
			</li>
			<li>
				<a href="#0">
					<div class="cd-project-title">
						<h2>Actualit&eacute;s du club</h2>
						<p>Les derni&egrave;res annonces du club</p>
					</div>
				</a>
			</li>
			<li>
				<a href="#0">
					<div class="cd-project-title">
						<h2>Nos actions</h2>
						<p>D&eacute;couvrez ce que nous r&eacute;alisons chaque jour</p>
					</div>
				</a>
			</li>
			
			<li>
				<a href="#0">
					<div class="cd-project-title">
						<h2>L'&Eacute;quipe</h2>
						<p>D&eacute;couvrez les membres</p>
					</div>
				</a>
			</li>
		</ul> <!-- .cd-projects-previews -->

		<ul class="cd-projects">
            
           
			<li> 
				<div class="preview-image">
					<div class="cd-project-title">
						<h2>D&eacute;couvrez le club</h2>
						<p>Qu'est-ce que le club ?</p>
					</div> 
				</div>
                
                 

            <div class="cd-project-info">            
                                    
                
<?php

$url = 'http://www.monclub.fr/api/show/page/notre-histoire';

$jsonData = file_get_contents($url);

$data = json_decode($jsonData, true);

foreach($data as $page) {

    $pagePermalink = $page['permalink'];

    echo $page['title'];

    echo '<a href="'.$pagePermalink.'">Link to page</a>';

    echo '<br>';
}

?>    
          
				</div> <!-- Slide1 -->
			</li>

			<li>
				<div class="preview-image">
					<div class="cd-project-title">
						<h2>Actualit&eacute;s du club</h2>
						<p>Les derni&egrave;res annonces du club</p>
					</div> 
				</div>

				<div class="cd-project-info">  
                
     
					<h3>Actualit&eacute;s 2016-2017</h3>
					<h4>
						Vous d&eacute;couvrirez i&ccedil;i les derni&egrave;res actualit&eacute;s du Club 
					</h4>
					
					 <div class="container">

                        <?php foreach ($posts as $Post): ?>
                            <!-- Plugins Post Begin -->
                            <?php Theme::plugins('postBegin') ?>

                            <div class="timeline-block timeline-block-right">
                               <div class="marker"></div>
                               <div class="timeline-content">
                                  <h3><a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a></h3>
                                  <span><?php echo $Post->date() ?></span>
                                    <?php
                                        // Cover Image
                                        if($Post->coverImage()) {
                                            echo '<img class="cover-image" src="'.$Post->coverImage().'" alt="Cover Image">';
                                        }

                                        // Call the method with FALSE to get the first part of the post
                                        echo $Post->content(false)
                                    ?>
                               </div>
                            </div>
                        <?php endforeach; ?>
                        <!-- Paginator for posts -->
                        <?php
                            echo Paginator::html();
                        ?>
                    </div> 
				</div> <!-- Slide2-->
			</li>
			

			<li>
				<div class="preview-image">
					<div class="cd-project-title">
						<h2>Nos actions</h2>
						<p>D&eacute;couvrez ce que nous r&eacute;alisons chaque jour</p>
					</div> 
				</div>

				<div class="cd-project-info">
					<h3>Les actions de notre club</h3>
					
					<p>Le club d&eacute;cline ses actions en cinq domaines :</p>
                    <div class="action">
                        <b>l’action int&eacute;rieure,</b>
                        <b>l’action d’int&eacute;rêt public,</b>
                        <b>l’action jeunes g&eacute;n&eacute;rations,</b>
                        <b>l’action internationale,</b>
                        <b>l’action professionnelle.</b>
                    </div>

					<p>loren ipsum </p>


					<h5>Nos actions</h5>
					<div class="grid">
					  <a href="img01.jpg">
					    <figure>
					      <img src="img/projet-01.jpg" alt="Ferrarissime">
					      <figcaption>
					        Ferrarissime
					      </figcaption>
					    </figure>
					  </a>
					  <a href="img02.jpg">
					    <figure>
					      <img src="img/projet-02.jpg" alt="Vin solidaire">
					      <figcaption>
					        Vin solidaire
					      </figcaption>
					    </figure>
					  </a>
					  <a href="img03.jpg">
					    <figure>
					      <img src="img/projet-03.jpg" alt="Les triplettes de Balma">
					      <figcaption>
					        Les triplettes de Balma
					      </figcaption>
					    </figure>
					  </a>
					  <a href="img04.jpg">
					    <figure>
					      <img src="img/projet-04.jpg" alt="Mon sang pour les autres">
					      <figcaption>
					        Mon sang pour les autres
					      </figcaption>
					    </figure>
					  </a>
					  
					</div>
				</div> <!-- .Slide3 -->
			</li>

			<li>
				<div class="preview-image">
					<div class="cd-project-title">
						<h2>L'&Eacute;quipe</h2>
						<p>D&eacute;couvrez les membres</p>
					</div> 
				</div>

				<div class="cd-project-info">
					<h3>Les membres du club</h3>

					<div class="membres" >
					
					  <div class="testimonial-quote group">
					    <img src="img/maite.jpg">
					    <div class="quote-container">
					      <blockquote>
					        <p>bla bla bla</p>
					      </blockquote>
					      <cite><span>Maith&eacute;</span><br>
					                Pr&eacute;sidente 2016-2017<br>
					                
					            </cite>
					    </div>
					  </div>
					
					  <hr>
					
					  <div class="testimonial-quote group right">
					    <img src="michele.jpg">
					    <div class="quote-container">
					      <div>
					        <blockquote>
					          <p>Le don de soi est une ouverture sur le monde.</p>
					        </blockquote>
					        <cite><span>Michele</span><br>
					                    Pr&eacute;sidente 2015-2016<br>
					                    A d&eacute;finir
					                </cite>
					      </div>
					    </div>
					  </div>
					
					  <hr>
					
					</div>


				</div> <!-- .Slide4 -->
			</li>


		</ul> <!-- .cd-projects -->

		<button class="scroll cd-text-replace">D&eacute;rouler</button>
	</div> <!-- .cd-project-container -->

	<nav class="cd-primary-nav" id="primary-nav">
		<ul>
			<li class="cd-label">Navigation</li>
			<li><a href="#0">D&eacute;couvrez le club</a></li>
			<li><a href="#0">Actualit&eacute;s du club</a></li>
			<li><a href="#0">Nos actions</a></li>
			<li><a href="#0">L'&Eacute;quipe</a></li>
            <li><a href="/admin">Administration</a></li>
		</ul>
</nav>
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Can you please also give the URL of your website (the address with http:// oder https.//).
viriisxp
Sr. Bludit
Posts: 33
Joined: Sat Jul 02, 2016 6:01 pm

User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Do I understand it right? It should be as follows:

- Découvrez le Rotary -> page
- Actualités du club -> post
- Nos actions -> post
- L'Équipe -> post

Or should all parts be pages? And: Why not use posts for all parts?
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

Edi is right, the page http://www.monclub.fr/notre-histoire or http://www.monclub.fr/post/notre-histoire

Could you paste the link to some page ? not the homepage.
Post Reply