Jump to content

Recommended Posts

Posted

I try to get startbootstrap-agency-1.0.4 template integrated into PW.

there are some anchors on that site, what I need is to have this anchor segments edited in PW.

How do I get in PW edited a segment on a single page. Or can I have only one page with all the fields in it. In that case it would be a very long single page in PW. Would like to edit these anchor segments in different pages.

but maybe I jus mix things up.

regards - Tobias

index.html

Posted

#anchors are part of the request url. Then comes PHP to build the response, which is sent back to the browser. At no time can PHP edit the url. I can only parse data from it. You could only php to include some kind of js to manipulate the url.

Edit: If you're only talking about creating segments, that can be targeted by such anchors, then that's easy. Just give the target an id attribute of that name:

// Link 
<a href="#my-segment">Go to my segment</a>

// Segment
<div id="my-segment">…</div>
Posted (edited)

actually I do not want to manipulate the url. The singel page is pretty long, I would like to split them up in fractions, so it would be easy to manage them in the backend of PW.

Like the below craniosacrale anchor, further down the segment of that anchor. The text of that segment has to be made dynamic. How I get that done in PW.

href="#craniosacrale"

<!-- craniosacrale -->
    <div class="portfolio-modal modal fade" id="craniosacrale" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-content">
            <div class="close-modal" data-dismiss="modal">
                <div class="lr">
                    <div class="rl">
                    </div>
                </div>
            </div>
            <div class="container">
                <div class="row">
                    <div class="col-lg-8 col-lg-offset-2">
                        <div class="modal-body">
                            <!-- Project Details Go Here -->
                            <h2>Project Name</h2>
                            <p class="item-intro text-muted">Lorem ipsum dolor sit amet consectetur.</p>
                            <img class="img-responsive img-centered" src="<?php echo $config->urls->templates?>img/portfolio/roundicons-free.png" alt="">
                            <p>Use this area to describe your project. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!</p>
                            <p>
                                <strong>Want these icons in this portfolio item sample?</strong>You can download 60 of them for free, courtesy of <a href="https://getdpd.com/cart/hoplink/18076?referrer=bvbo4kax5k8ogc">RoundIcons.com</a>, or you can purchase the 1500 icon set <a href="https://getdpd.com/cart/hoplink/18076?referrer=bvbo4kax5k8ogc">here</a>.</p>
                            <ul class="list-inline">
                                <li>Date: July 2014</li>
                                <li>Client: Round Icons</li>
                                <li>Category: Graphic Design</li>
                            </ul>
                            <button type="button" class="btn btn-primary" data-dismiss="modal"><i class="fa fa-times"></i> Close Project</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
Edited by LostKobrakai
please use the codebox for code
Posted

Ah now I see your problem. 

You can simply use multiple pages to manage your segments. 

// home.php is most likely the startpoint for your single page website

$children = $page->children;

foreach($page->children as $child){
  echo $child->render();
}
// some-childs-template.php
<div id="some-segment">
  // Render the segment content
</div>
Posted

thank you, now I have to get to know how to do multiple pages, do have a site to recommend about multiple pages, and the code above?

Posted

i did the Basic Website Tutorial unfortunatly it is not really working for a beginner. things are missing or wrongly written, like the TUT_article.php

i like to learn it but things like this makes it a bit more difficult.

    <?php include("./TUT_header.inc"); ?>

    <div id="article-container">
    	<div class="article-row">
    		<div class="article-mainimage">
    			<img src="<?=$page->article_images->first()->url ?>">
    		</div>
    		<div class="article-introbox">
    			<h2><?=$page->get("headline|title") ?></h2>
    			<div class="article-introtext">
    				<?=$page->article_introtext ?>
    			</div>
    		</div>
    	</div>
    	<div class="article-row">
    		<div class="article-main">
    			<img src="<?=$page->article_images->last()->url ?>">
    			<?=$page->article_maintext ?>			
    		</div>
    	</div>
    </div>
     
    <?php include("./TUT_footer.inc"); ?>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...