justnew77 Posted September 11, 2013 Share Posted September 11, 2013 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! Link to comment Share on other sites More sharing options...
diogo Posted September 11, 2013 Share Posted September 11, 2013 Welcome to PW! You need to elaborate your question a bit more so we can help you. Did you read the documentation or any of the tutorials? http://processwire.com/api/ http://processwire.com/api/tutorials/development-getting-started/ 2 Link to comment Share on other sites More sharing options...
pwired Posted September 11, 2013 Share Posted September 11, 2013 COMING FROM MODX Link1: You've been using MODX but now you've found ProcessWire. It’stotally amazed you and you can’t wait to get started. But…you arewondering where everything is. If this is you, read on…http://processwire.c...ning-from-modx/ Link2: A MODX refugee: questions on features of ProcessWirehttp://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/ 3 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 11, 2013 Share Posted September 11, 2013 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. 2 Link to comment Share on other sites More sharing options...
justnew77 Posted September 11, 2013 Author Share Posted September 11, 2013 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? Link to comment Share on other sites More sharing options...
Philipp Posted September 11, 2013 Share Posted September 11, 2013 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. 7 Link to comment Share on other sites More sharing options...
justnew77 Posted September 12, 2013 Author Share Posted September 12, 2013 Ok thanks. I renamed my template-file to home.php and this works fine. Link to comment Share on other sites More sharing options...
justnew77 Posted September 12, 2013 Author Share Posted September 12, 2013 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 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 12, 2013 Share Posted September 12, 2013 look at the documentation Look at the forum thread 1 Link to comment Share on other sites More sharing options...
diogo Posted September 12, 2013 Share Posted September 12, 2013 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 1 Link to comment Share on other sites More sharing options...
justnew77 Posted September 12, 2013 Author Share Posted September 12, 2013 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) Link to comment Share on other sites More sharing options...
justnew77 Posted September 13, 2013 Author Share Posted September 13, 2013 Ok, i got it: This goes with the Parameter 'outer_tpl' => '<ul id="menu">||</ul>', Link to comment Share on other sites More sharing options...
Manfred62 Posted September 13, 2013 Share Posted September 13, 2013 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> 3 Link to comment Share on other sites More sharing options...
justnew77 Posted September 13, 2013 Author Share Posted September 13, 2013 Hm, ok thanks for the Information. I will just Play around with that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now