Jump to content

Recommended Posts

Posted

Hi,

I am justnew77 and just new to processwire. I came from MODx so I am actualy not new to CMS.

I can not join my template to the default startsite. How do I di that?

Or how do I create a NEW startsite with my own template?

Greetings from Germany!

Posted

COMING FROM MODX

Link1: You've been using MODX but now you've found ProcessWire. It’s
totally amazed you and you can’t wait to get started. But…you are
wondering where everything is. If this is you, read on…
http://processwire.c...ning-from-modx/



Link2: A MODX refugee: questions on features of ProcessWire
http://processwire.c...of-processwire/

 

Link3: Code comparison between modx and processwire.

http://processwire.c...ge-2#entry30349

More here:

http://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/

  • Like 3
Posted

In MODX you've to setup a whole lotta stuff. With tons of different settings depending on the state of the other. You need an infinitly large brain to know what you're doing.

Play around here, you'll be settled within no time. Welcome to ProcessWire.

  • Like 2
Posted

Thank you all for the links. I think they could help me.

I read the "getting started" tutorial but I still can't figure out what I wrote in my first psoting:

I got the start site next to the Icon with the Little house. When i create a new page it is UNDER the start site.

The start site contains the demo site an demo template with ist not changeable.

So how can I Change this?

Posted

Your're looking at the page tree of ProcessWire. It represents the structure you also see on the page itself. As you mentioned, the first Page (/) with the house icon is the start site. You can't delete this page, because everything within PW is a child of this (even the admin pages itself).

In the default installation, this page has the template "home". You could change this but you don't have to (and also it will cause trouble with permissions...).

In the PW admin, go to Setup->Templates to change the fields of the home template. Open Setup->Fields to edit or add new fields you want to use in the home template. We can find the template file for home under the template directory in the PW installation path: /site/templates/home.php . Open it and you will see the markup for the start page. As in the tutorials, you can change everything here and build your own customized start page.

Basically, you just overwrite the default home template with your own fields and templatefile.

You could try to just download the blank profile  and instead of installing a fresh PW, just replace the content of the site/templates folder. After that, you can delete all example pages from the admin and customize the home template.

  • Like 7
Posted

Hi,

i want to render out a navigation menu!

I got 3 pages: Start/Home, About and Contact.

I installed the MarkupSimpleNavigation modul and tryed this:

<?php
$treeMenu = $modules->get("MarkupSimpleNavigation"); 
echo $treeMenu->render(); 
?>

But it lists only 2 pages. The home/start page ist not in the list. Why?

BTW:
How can I say the Module what css class he should use

Posted

From the documentation of the module https://github.com/somatonic/MarkupSimpleNavigation#markupsimplenavigation-116

$options = array(

    'parent_class' => 'parent',
    // overwrite class name for current parent levels

    'current_class' => 'current',
    // overwrite current class

    'has_children_class' => 'has_children',
    // overwrite class name for entries with children

Those are the options that let you modify classes, check all the other options also. They are many :)

  • Like 1
Posted

Ok now it shows the "root page" correctly. But he did not add the class to the LI

I do it so:

$treeMenu = $modules->get("MarkupSimpleNavigation"); 
		
$options = array(
'parent_class' => 'menu',
'current_class' => 'active',
'show_root' => true
);
echo $treeMenu->render($options); 

But it renders out like so:

<ul>
<li><a href="/dev/">Home</a></li>
...

Without a class Parameter for the parents. (Current class do work)

Posted

There's no need for a module. Take a look in the example code of the default PW installation.

If you only need a simple list:

<ul id="menu">
<?php		
	$homepage = $pages->get("/"); 
	$children = $homepage->children;
	$children->prepend($homepage); 
		
	foreach($children as $child) {
		$class = $child === $page->rootParent ? " class='active'" : '';
		echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>";
	}

?>
</ul>
  • Like 3

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
  • Recently Browsing   0 members

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