Jump to content

Speed

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Speed

  1. @Bernhard: It was quite interesting. However, I believe, I've found solution. Thank you for sharing anyway. @Robin S: Truthfully...The Doc for MSN is insufficient, Not much of example that could help me get idea. Also. I don't have strong knowledge in php, I am still struggling... It takes one day a time.
  2. Hi guys, With Single page in HTML, especially when they are so long I could create page jump with #foo inside nav anchor tag... This is what I would type in HTML... <nav> <ul> <li><a href="#sec-a">Section A</a></li> <li><a href="#sec-b">Section B</a></li> <li><a href="#sec-c">Section C</a></li> <li><a href="#sec-d">Section D</a></li> </ul> </nav> <section id="sec-a"> <div class="title"> <h1>Title</h1> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut, atque?</p> </div> </section> <section id="sec-b"> <div class="title"> <h1>Title</h1> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut, atque?</p> </div> </section> <section id="sec-c"> <div class="title"> <h1>Title</h1> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut, atque?</p> </div> </section> I only wonder how could I do page jump in PW with Markup SImple Navigation following these PW code below? Any modules or suggestions? <nav> <?php $nav = $modules->get("MarkupSimpleNavigation"); $nav_options = array( 'show_root' => true, 'outer_tpl' => '<ul class="nav">||</ul>', 'inner_tpl' => '<ul class="drop">||</ul>', ); echo $nav->render($nav_options); // render the menu ?> </nav> <section id="sec-a"> <h2><?php echo $page->title; ?></h2> <?php echo $page->body ?> </section> <section id="sec-b"> <h2><?php echo $page->title; ?></h2> <?php echo $page->body ?> </section> <section id="sec-c"> <h2><?php echo $page->title; ?></h2> <?php echo $page->body ?> </section> Thanks in advance
  3. Yes, I am aware using hash as link in href isn't great idea but it's lot better than javascript:void(0) since violates csp Content Security Policy . Its very bad practice to use JS syntaxes inside HTML. Yes, I could use button element instead, but how would I do it on unordered list along with Markup Simple Navigation? Your jQuery e.preventDefault() actually solved my problem, Thank you! You know I did thought of that method earlier and said to myself it doesn't make any sense oh well, once again Thank you for taking your time to help me solve my issues.
  4. Thank you for taking your time to reply, Your suggestion would work, maybe on another project in the future, But, I am targeting for on click functions, I'd want drop down menu to go in effect after clicking without page reload. The only thing I can think of is replacing parent link (/parent/) into (/#/). Unless there are other way around in MSN, module or etc. Oh this would be problem on a responsive (mobile) mode, when you tap on the parent, it'd reloads! None of child would display on dropdown.
  5. Hi Guys, Today, for the first time I've been playing with Markup Simple Navigation. I am able to pick things up quickly, I had no issues with MSN except for dropdown, well not quite. Here's what happen... I've created 4 pages and one of parent page contain 2 child page, which would be used as drop down. Two of child menu will always be hidden inside parent ever time page loads up. Once the parent menu is clicked, this will slide down in time fashion and display two childs underneath parent. Once the child menu is clicked, it will be taken to child page and drop down will slide back up or hide the child. It worked in HTML page and It almost worked in PW, I did troubleshoot and discovered the issues. The HTML page the parent menu contain hashtag '#' inside href.... <a href="#">Parent<span>▼</span></a> This hashtag will not refresh page or reload page when clicked as I mentioned earlier, dropdown will stay hidden everytime uploads now with PW, The parent menu/page contain with link '/parent/' and if I click on this menu, the drop down will show but hides fast because page reloads. Is there a way I could get this parent page/menu with link '/parent/' turn into # with PW or MSN?
  6. It all make sense now! Thank you for guys for clarification.
  7. Hi Everyone, As much I am trying to understand the core of PW, I've been following few other tuts including Joss Sanglier's basic webpage tutorial. It was easy to follow except the part where I could not solve problems with image size. Here's link https://processwire.com/docs/tutorials/simple-website-tutorials/the-basic-website/page5 see the "Writing the Panel Code" part. Here's my code... using KubeCSS foundation. <?php include("./includes/head.inc"); ?> <div class="row centered"> <div class="col col-6"> <div class="content"> <h1><?php $page->title; ?></h1> <?php echo $page->ckeditor_1; ?> </div> </div> </div> <?php $panels = $pages->find("template=basic-page"); foreach($panels as $panel);{ ?> <div class="panels" style="background-color:<?php echo $panel->color_picker; ?>"> <div class="row centered"> <div class="col col-8"> <div class="content"> <h2><?php echo $panel->title; ?></h2> <?php echo $panel->ckeditor_2; ?> <p class="readmore"><a href="<?php echo $panel->url; ?>">Read More</a></p> </div> </div> <div class="col col-8"> <div class="content"> <?php if($panel->image_single){ echo "<img src='{$panel->image_single->size(400,200)->url}' alt='{$panel->image_single->description}'>"; } ?> </div> </div> </div> </div> <?php } ?> <?php include("./includes/scripts.inc"); include("./includes/foot.inc"); ?> ... and got error... I've "debugged" part of code and noticed echo "<img src='{$panel->image_single->size(400,200)->url}' alt='{$panel->image_single->description}'>"; The size(400,200) is the problem! Can anyone help me resolve this issues. Thanks in advance
  8. Thank you deltavik and Doug G. for clarification. I had permission changed by visiting host's cPanel > File manager. Oh, FTP Filezilla didn't work. It keep on changing after I enter 400. As much I prefer using FTP over cPanel filemanager It'd be nice to know which FTP will work, Anyone? Should I change Writable Permission for htaccess too?
  9. I understand writable need to be locked and make it readable inside config.php. But... I am not sure I understand what I need to do to make writeable locked after reading from this link https://processwire.com/docs/security/file-permissions/#securing-your-site-config.php-file. I opened config.php and could not find what I need to change. Can anyone give me idea what I need to do? This came from after completion of PW installation.
  10. Oh I feel stupid , From httpd.config The processwire document root is set at C:\MAMP\processwire MAMP server Preference > (Tab) WebServer the document root is set \MAMP\htdoc. I have changed it into C:\MAMP\processwire and it initiate install.php
  11. Robin S, BitPoet, and Szabesz, thank you for responding. Although Virtual host worked! I've followed this clear and precise tutorial https://www.taniarascia.com/setting-up-virtual-hosts/ . Test confirmed when I added index.php alone and typed <?php "Hello World" ?> However, new problem arises. After copy/paste PW files into local hoses... Typed "mylocal:8888" on address bar. I end up with "index of/" page. The PW did not initiate installation. I've tried add "mylocal:8888 index.php" and "mylocal:8888 \index.php" I end up divert to google search. I've restarted MAMP server nothing happens. How can I get PW to initiate installation? Here's some information. processwire's directory C:\MAMP\processwire httpd.conf <VirtualHost *:8888> ServerName mylocal DocumentRoot "C:/MAMP/processwire" </VirtualHost> host 127.0.0.1 mylocal
  12. Hi Everyone, New here but not new to CMS and Template developing . Early today, I've installed PW, it was successful, the result was flawless. But then, I realized I've encounter 404 error and was unable to go into admin. I've spend 4 hours going through troubleshooting guide following this link http://processwire.com/docs/tutorials/troubleshooting-guide/page3 and I am not getting any luck, so I was hoping I could get some help from you so I can get started with PW First, the PW is running on localhost using MAMP 3.3.2 (free version). The PW files is located inside MAMP/htdocs as subfolder called pwNew. So obvious inside htaccess the Rewrite Base command should be RewriteBase /pwNew (of course hashtags has been removed) if I did it right, then it didn't work for me! So next, I went inside /apache/conf/httpd.conf and then changed... 'none' to 'All' <Directory /> Options FollowSymLinks ExecCGI AllowOverride All Order deny,allow Allow from all </Directory> Unfortunately, it didn't work for me. I've confirmed twice... the mod_rewrite have been installed, up and running. Confirmation # 1 running mod_rewrite_test.php with this code below, <?php if(in_array('mod_rewrite', apache_get_modules())) { echo 'mod_rewrite is installed.'; } else { echo 'mod_rewrite isn't installed.'; } ?> ...and then run it from browser Confirmation # 2 from phpinfo I really need your help and hope there are solution for it. Thanks in advance.
×
×
  • Create New...