Jump to content

Use functionalities of skyscraper in Regular Profile


August
 Share

Recommended Posts

I play around with it a bit because I think it's possible. So one Site -Setup for Regular and Skyscraper (from https://github.com/dadish/pw-skyscrapers-profile). After that I merged some things. On the 3rd Site I put in everything, adjusted the pages, especially the _init.php to include the  _func.php, search etc. After that, the regular Profile is working fine, the search-forms are shown and a few additional cities are available (just Testing).

The first try to list all available cities ends with an error on count, which I solved like here:

Now I get the following Errors, I would be very happy if you could help me on the jumps, getting further ...

image.thumb.png.b6de32fad373148bf2374272475458cd.pngimage.png.22e7ec04f3369e3ea257a01a9d3c2162.png

cities-list (template) looks like that:

	<?php foreach($items as $item): ?>
	<li><a href='<?=$item->url?>'><?=$item->title?></a> 
		<small class='uk-text-muted'><?=$item->numChildren?></small></li>
	<?php endforeach; ?>

 

A Tick on List All:

image.png.9b906c056f0bd3eab03093e219fe66dd.png

 

And code within other templates - like in the following snippet, works fine ..

   <p>Test:
        <?php
        $prefix = $itemList = '';
        foreach(page()->set_test as $item) {
        $itemList .= $prefix . $item->title;
        $prefix = ', ';
        }
        echo $itemList;
        /* getting id - only
                <?=page()->set_test?>
        */
        ?>
    </p>

ProcessWire 3.0.123 in usage..

Thanks on any hint!

 

Link to comment
Share on other sites

			<?php// include_once("./browse.php"); /* if I uncomment these include, the items (cities) are not shown ..*/?> 
			<?php echo region('mainHeader'); ?>
			<div class=''>
				<div id='content' class=''>
					<?php echo region('content'); ?>
				</div>
				<div id='sidebar' class=''>
					<?php 
					echo region('sidebarHeader');
					include("./includes/search-form.php");
					echo region('sidebar');
					include("./includes/sidebar-links.php");
					?>
				</div>
			</div>

Hi elabx, of course, I checked the files for the pw-namespace. Thank you.
In the _main.php I mix:
 

			<nav id='masthead-navbar' class="uk-navbar-container" uk-navbar>
				<div class="uk-navbar-center uk-visible@m">
					<?=ukNavbarNav($home->and($home->children), [ 
						'dropdown' => [ 'basic-page', 'categories' ]
					])?>
				</div>
			</nav>

together with

			<?php// include_once("./browse.php"); /* if I uncomment these snippet, the items (cities) are not shown */?> 
			<?php echo region('mainHeader'); ?>
			<div class=''>
				<div id='content' class=''>
					<?php echo region('content'); ?>
				</div>
				<div id='sidebar' class=''>
					<?php 
					echo region('sidebarHeader');
					include("./includes/search-form.php");
					echo region('sidebar');
					include("./includes/sidebar-links.php");
					?>
				</div>
			</div>

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...