Jump to content

maba

Members
  • Posts

    167
  • Joined

  • Last visited

Everything posted by maba

  1. Not a big problem, but for the next release: now it works but cannot use this features (in _init.php of skyscrapers profile) /*************************************************************************************** * SHARED VARIABLES * * These are the variables we've decided template files may choose to populate. * These variables are ultimately output by _out.php. Here we are establishing * default values for them. * */ $browserTitle = $page->title; // what appears in the <title> tag $headline = $page->title; // primary h1 headline $content = $page->body; // bodycopy area Or better.. we have to overwrite this variables in all templates because language-gateway is the first template loaded so title is "ITALIAN" (e.g.) and body is empty.
  2. Sorry.. I removed full path and replace it with "path" only for the post.. Yes, it works. Eh, eh.. I tried new skyscrapers profile.
  3. Webroot installation. Yes, with the last snippet it works. Are in dev branch, I've seen these in this Ryan's post. Thanks Soma!
  4. Replaced all the code in language-gateway.php with your, same error (on line 3).
  5. Nope /en/ Prepend... language-gateway; [b]Warning[/b]: include(/site/templates/language-gateway): failed to open stream: No such file or directory in [b]/path/site/templates/language-gateway.php[/b] on line [b]5[/b] [b]Warning[/b]: include(): Failed opening '/site/templates/language-gateway' for inclusion (include_path='.:/Applications/MAMP/bin/php/php5.4.4/lib/php') in [b]/path/site/templates/language-gateway.php[/b] on line [b]5[/b] Append... language-gateway; Thanks
  6. Loaded templates: /it/ Prepend... home; Append... home; /en/ Prepend... language-gateway; Prepend... language-gateway; Prepend... home; Append... home; Append... home; Append... language-gateway;
  7. Hi, if I try to use prependTemplateFile and appendTemplateFile in a site with multi language on and PW-language-localized-URL, _init and _out files are parsed many times: <?php echo "Prepend...<br />"; and <?php echo "Append...<br />"; / (it, default language): Prepend... Append... /en/ Prepend... Prepend... Prepend... Append... Append... Append... /fr/ Prepend... Prepend... Prepend... Append... Append... Append... /some-it-pages/or-children Prepend... Prepend... Append... Append... Some problem with language-gateway? Marco
  8. Soma, thanks for the answer. Is enough. My fear is to don't use all the features that PW give us. When you said that I can use MarkupSimpleNavigation I thinked that probably I don't understand its potential. I search far and wide in the forum but I don't found (module) examples that can help me. These are the open points.. other things is already done with the posted code. I've some problems with the first, I'll try to fix it. Sorry, isn't my goal. Again.. thanks. Marco
  9. Hi everybody.. Soma, I've some problems with the module. Ok, I can delete my Products page (and children) but how I can inject my "edited" Products menu? Can you post an example? Thanks! Marco
  10. Soma, if you say that I can use the module to optimize the menu logic.. I totally misunderstand it.
  11. Hi netcarver, you're right. I've created a gist Thanks
  12. Hi All, with this I start to create this menu where: not show all root children show all company children show products following sectors/applications way show new label for the newest products (see Products->Water->Derivation) (I would) not show applications without products (see Products->Gas->Derivation) show contacts (todo) show galleries (more complex than products, based on category, static sample now) (todo) show blog children (done) multi language In attach my pages structure. My code: https://gist.github.com/4348501 Now: how to clear this code? How DRY it (e.g. $class declaration)? How optimize it? Thanks, Marco
  13. Thanks to you to follow me I try to make my whole dynamic menu (this is a little part only). After that I'll post some code.
  14. Hi Ryan, yes, I confirm the the problem. foreach($products->find("sectors=$s, applications=$a") as $p) { echo "TEST ONLY: <li><a href='$p->url'>$p->title</a></li>"; } prints nothing. This foreach($products as $p) { if(!$p->applications->has($a)) continue; if(!$p->sectors->has($s)) continue; echo "<li><a href='$p->url'>$p->title</a></li>"; } works.
  15. Hi, after some changes.. (use become application and application become sector). // $products = $pages->find("template=product, sort=title"); $sectors = $pages->get("/settori/")->children; $applications = $pages->get("/applicazioni/")->children; echo "<ul>"; foreach($applications as $a) { echo "<li><a href='$a->url'>$a->title</a><ul>"; foreach($sectors as $s) { echo "<li><a href='$s->url'>$s->title</a><ul>"; foreach($pages->find("template=product, sectors=$s, applications=$a") as $p) { echo "<li><a href='$p->url'>$p->title</a></li>"; } echo "</ul></li>"; } echo "</ul></li>"; } echo "</ul>"; without foreach($pages->find("template=product, sectors=$s, applications=$a") as $p) { I cannot retrieve products. First line is commented for this post only. Why?
  16. My english isn't so good, so I can't express my thoughts (and requests ). I love ProcessWire, the forum and the contribution that Ryan and the PW gurus give to the community. I hope I will be able to return this in future. Thank you all, guys.
  17. Hi mcmorry, I've read the howto and the thread.. Point 3 in howto: I want disable it for the default language -> so I don't create "it" page. With "it" page it works.
  18. Hi Soma, sorry, I think that it can be e general configuration error. No logs or other errors, only a general 404 when I disable sub-folder. All debug options enabled. It not works fine for me: with Disable sub-folder for default language unchecked it works when I write URL manually less /it/, when it is checked it not works at all.
  19. Hi, I've a little problem with this module. Works very well but.. I've two languages now.. IT and EN. IT is the default. With Disable sub-folder for default language checked: example.com -> it, works example.com/it/ -> it, not works, ok example.com/en/ -> en, not works, not ok example.com/prodotti -> it, not works, not ok example.com/en/products -> en, not works, not ok ... If Disable sub-folder for default language unchecked: example.com -> it, works example.com/it/ -> it, not works, ok example.com/en/ -> en, works, ok example.com/prodotti -> it, works, ok example.com/it/prodotti -> it, not works, ok example.com/en/products -> en, works, ok but, obviously, all the IT links created from the system has prefix "it" (not works). Forgot something? Thanks, Marco
  20. Hi, done. Menu also. Better way to do this? echo "<ul>"; foreach($pages->get("/applicazioni/")->children as $application) { echo "<li><a href='{$application->url}'>{$application->title}</a><ul>"; foreach($pages->get("/usi/")->children as $use) { echo "<li><a href='{$use->url}'>{$use->title}</a></li><ul>"; $products = $pages->find("template=product, applications=$application, uses=$use"); foreach($products as $product) { echo "<li><a href='{$product->url}'>{$product->title}</a></li>"; } echo "</ul></li>"; } echo "</ul></li>"; } echo "</ul>"; (it is the default language) Marco
  21. Hi Ryan, thanks for you feedback. I've tried repeater as you suggest. It works. But.. After I've talked again with the client I think that there is a simpler solution: two checkbox fields, multi choice. Uses are linked to product and not to applications. If a product is for jointing and repairing in water applications is the same for gas applications.. (if the product is linked to gas application). But the menu have to be as described in the first post: for each application list all linked products grouped by use. Is it possible with the two checkbox fields? Marco
  22. I'm interested. I don't know German.. but I think that the app is not so hard to understand and use. Thanks
  23. Talked with the client. Simple solution: dynamic menu for Application->Use->Products and all the product links are /product/item. So: Application1 \_Use1 \__Item1 \_Use2 \__Item1 \__Item2 \_Use3 \__Item5 Where Application1 link is /applications/application1 and lists all uses belonged to application1. Where Use1 link is /applications/application1/use1 lists all products tagged use1. Is this possible? Where Item1 link is /product/item1 lists item1 detail. Where /products/ lists all products grouped by uses and applications.
×
×
  • Create New...