Jump to content

Recommended Posts

@triples

When you edit a page, go to the "Settings" tab and under "Templates" change "Home page" for whatever other option there is.

The following pages are using these templates:

About -> "Basic page"

Features -> "Basic page"

Services -> "Basic Page with Sidebar items"

Contact us -> "Contact us page"

You can of course also still use "Home page" and replace the content of the home.php template file with the content of another template file, if you want the homepage to be a little different for exemple.

This profile uses a "delegate approach".

  • Like 1

Share this post


Link to post
Share on other sites

Hi Christophe,

Thank you for these details Gayan. I'll look at them.

But do you have an idea about the translation of the "missing required field" error message. Can we translate it elsewhere than in the core file where it is?

Found this nice post by Soma hope this would solve your problem. 

Share this post


Link to post
Share on other sites

Thanks for the site profile. This is golden!

I will definitely try it in my next Bootstrap project (currently I'm more into Uikit).

  • Like 1

Share this post


Link to post
Share on other sites

Hello Gayan,

I'll look at this later. Thank you.

I'm thinking that perhaps it would be solved if I installed another language. I'll have to check.

Share this post


Link to post
Share on other sites

Hi,

I have installed the French language and set it up for the Guest user.

It doesn't change anything apparently.

I still can't have the "missing required field" error message (of the contact page) translated.

Solutions?

Thanks in advance

Share this post


Link to post
Share on other sites

First of, Gayan thank you very much for this excellent profile.

I am using this as a starting point on all my own profiles for client work. I have made additions/modifications, but the basis is the same.

One question I have is with regards to passing variables on through to the functions in _functions.inc and then on to templates.

Specifically I am using Ryan's excellent form builder module. And would like to use his embed method C to embed the form directly into my template.

The template I want to embed into is a new version of page-block-type-x.

To get the form embedded on to a page is easy.

Just include the following in the _init.php file

$form = $forms->render('contact');

Then use this on the page template.

echo $form;

However if I add the second to my page-block-type-x template it says "undefined variable form"

I have tried putting the first "render" part into the function in _functions.inc, but then it says "undefined variable forms"

Any ideas how I can get this data/variables to bubble through to the partial template?

Share this post


Link to post
Share on other sites

Hi Mike, Thank you for using this site profile. First I will try to replicate your issue and get back to you as soon as I can. (Sorry sending via mobile)

Share this post


Link to post
Share on other sites

Thanks Gayan, I have also opened a thread on the Form Builder forum to see if anyone there can help. If I get an answer here or there I will cross post so it is available in both places.

I did this as I was not sure where the issue is. More then likely something I am doing wrong due to my lack of PHP knowledge.

Thanks once again for the excellent work you did here.

Share this post


Link to post
Share on other sites

Ryan replied back to my issue on the Form Builder support forum. Here is the solution he suggests.

I'm not familiar enough with this profile to suggest the ideal way to handle this, but it does sound like just a matter of variable scope. You might want to bundle your $form variable as a new API variable from your _init.php file, so that you can access it from anywhere. The way you can do this is:

$this->wire('form', $forms->render('contact')); 

Then when you need to access it later, access it like this:

$form = wire('form');

Also, for that first example, if $forms is out of scope where you are accessing it from (like within a function or something), then access it as wire('forms');

And the way I did it myself, before I saw his post:

I did get this working finally. Added

$form = wire('forms')->render('contact');

up one level in the _functions.inc

Then just echo the form variable in the markup template.

Both work, but it's my guess that Ryan's is the better way, as he has way more experience then I have. :)

  • Like 1

Share this post


Link to post
Share on other sites
Hi Gayan

Thank you for sharing your nice theme. I just want to add a multi language option. Can you help which code and where to add that?

Share this post


Link to post
Share on other sites

HI saboor, 

Thanks for using the theme. Really sorry for late response.  

I just want to add a multi language option. Can you help which code and where to add that?

Here are the steps: (it is easy)

  1. Install `Languages Support` and `Languages Support - Fields` modules
  2. Change `title` field type from `PageTitle` to `PageTitleLanguage`
  3. Add extra Languages on `Setup` > `Languages`
  4. Change `body` field type from `Textarea` to `TextareaLanguage`. (change other fields accordingly)
  5. For the multi langage selections please refer the following post.
    1.  https://processwire.com/talk/topic/7798-exclude-users-current-language-from-list/

Please let me know if you need further help.

~ Enjoy with ProcessWire. 

Thanks 

Share this post


Link to post
Share on other sites

Hello Gayan,

Thank you for sharing this profile! I have been away from PW for a while and it was nice surprise to see the community thriving and all the improvements over the revisions. One of the aspects that PW lacked was 'themes' to get the end users to start blogging and publishing content right away.

I know this sample profile is geared towards developers and admins but if I may suggest different naming of Pages. Honestly, I had to look up 'hero unit'...never came a cross this concept in any language but I guess design and development are merging in web world.

Anyhow, here is what I would suggest for Tools pages:
post-435-0-02857900-1439763674_thumb.jpg

- It would be nice if 'Featured Content' could trim and pull field(s) from existing content like other Pages rather then static entries on their own but it works well for this scope.

- 'Storage & settings' for SEO is bit misleading as well, maybe just 'SEO and Page Blocks' since there is not much 'storage' per say?

- SEO fields = if left empty they do not use the 'Title' and 'Description' of the current page but rather what is specified on 'Home' page. Wording is little misleading and will cause every page to be presented as the same. While handy, IMHO, every page should pull its own SEO even if only from 'title' and 'body' fileds of the current page.

- Top drop-down menu seems a bit redundant where Parent page is listed twice. Any suggestions?

post-435-0-06321800-1439763148_thumb.jpg

I have only spent an afternoon working with this profile and it absolutely fantastic. If fact, it will be the core of what I use for my next project.

Thanks for your time.

All the best.

Edited by biotech
  • Like 1

Share this post


Link to post
Share on other sites

Dear Biotech, 

Thank you so much for taking your time to play around with blue-vr theme. Also I greatly appreciated for your feedback. 

 

- 'Storage & settings' for SEO is bit misleading as well, maybe just 'SEO and Page Blocks' since there is not much 'storage' per say?

 

  You are right, we should put SEO and Page Blocks instead of `Storage & settings`.

 

- SEO fields = if left empty they do not use the 'Title' and 'Description' of the current page but rather what is specified on 'Home' page. Wording is little misleading and will cause every page to be presented as the same. While handy, IMHO, every page should pull its own SEO even if only from 'title' and 'body' fileds of the current page.

 

  Totally agree and will fix this on upcoming release. 

 

- Top drop-down menu seems a bit redundant where Parent page is listed twice. Any suggestions?

 

   Noted this issue, for now I would suggest to use another field to display top menu item caption. So we can easily fix this problem.

 

Thanks again for your feedback. :rolleyes:

 

~ Enjoy

Share this post


Link to post
Share on other sites

Hi Gayan,

Happy to provide feedback and thanks for a quick reply. While at it, I noticed some css play is off. If you create a new 'Common page block' (like Contact us banner) the link in the content does not get wrapped with the same attribues.

eg. "Contact us banner"

<a class="btn btn-default btn-lg" href="/contact-us/">Contact us <em class="fa fa-fw fa-angle-right"></em></a>

eg. "Some new banner"

<a href="/sandbox/pw/page/">Go to my page</a>

Both are using same template of 'Common page block' and source code is the same in the body field and 'Render Image as a background' option is used.

All the best.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Gayan,

Found a few more bugs, not sure if this is due to bootstrap framework, is that

- if you use 'On page block' with an image and then disable css images are rendered twice on the page. Not ideal for accessibility.

- 'Feature/Service set' ignores re-ordering of pages and it seems to sort by page ID

- Removing 'Reference' = deleting or unpublishing each entry seems the be the only way to 'hide' them as they are not a Common block. Leftover css leaves padding.

- On 'Contact Us' page leaving Sub title for google map empty still outputs default txt of "Find us on Google Maps". Edited on 'google-map.inc' but still 2 column layout is imposed if map is not desired.

Another thought for 'SEO fields' mentioned above, we could use Home page 'SEO title' to hold starting value eg. "Our Website | " and then append the current page title (or SEO field if not empty) resulting in "Our Website | Contact us".

HTH

All the best.

Edited by biotech

Share this post


Link to post
Share on other sites

Is there a way to add 'home' page in the navigation (top/bottom)?

My hack is to edit "_navigation.inc"

...
  
 $page = wire('page');
    $out = '';

$out ='<li><a href="/myroot/" title="Home">Home</a></li>'; // hardcoded link to 'Home'
    
    foreach($items as $item) {
....

But I am sure there is a better way as well as to inlude the css active state.

Thanks so much.

Share this post


Link to post
Share on other sites

Is there a way to add 'home' page in the navigation (top/bottom)?

Trick is to modify the `links` field `Selectable Pages` into `Custom Selector`.

  1. Go to Setup > Fields > links
  2. Click on Input tab
  3. Under Selectable Pages
    1. Remove `Parent of selectable page(s)` settings 
    2. Add custom selector under `Custom selector to find selectable pages` 

Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Gayan,

I used the "parent=/" as a custom selector, worked great for the bottom navigation of page listings. Any workaround for the top nav?

Share this post


Link to post
Share on other sites

Hello Gayan,

.. a long time lurker here, your great theme provoked me to finally make a post;)

Apologies, if this was asked/answered before but is your theme retina ready? 

Thank you,

Ian

Share this post


Link to post
Share on other sites

Hi Gayan,

.. Appreciate your prompt response.

Well, that's what I half-expected.

What would you say, how much effort (time/money) would it take to upgrade this to a retina-ready template?

Thanks,

Ian

Share this post


Link to post
Share on other sites

Hi Gayan,

No worries, I understand.

.. just started to play around with the template, it looks very neat and professional.. I like it so far:)

I'll be back if I come across any issues.. Hope I won't bother you and all the Processwire experts too much;)

Gayan, thank you for all your efforts and time creating this great template!

Ian

Share this post


Link to post
Share on other sites

Dear Gayan,

I'm a bloody beginner in processwire, my apologies beforehand...
I installed your Blue VR Site and I really love it. I just have one big problem and I couldn't find anything helpfull regarding my problem in this forum.

I want to show a simple photo gallery on one page of the site and I couldn't manage to make it work.

Even with the easiest tutorial it didn't work https://processwire.com/docs/tutorials/galleries-short-and-long/page2

You have the Images field set up in your sites structure, but it doesn't show images when used.

My problem is, that I don't know how to add markup to the template file, so that the images show up. I think it isn't working because I don't really know how the delegate template thing really works.

Thanks in advance,

Leo

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By rushy
      I'm trying to migrate a PW site on my local dev server to a shared hosted server and have used the ProcessExportProfile module to export a profile as a zip file. So far so good. I then deploy new install of PW on the server by unzipping the PW installation files but I do not run the install until I have replaced the various site profiles with the files from the exported profile. So basically:
      In the PW install files I delete all the site-* folders except site-default. This one I overwrite with  the export profile folders so it contains my assets, install, modules and templates folders together with the exported config.php
      I then run the install in the browser in the normal way and it starts the installation and I can see my website profile in the list and I select it. It proceeds as normal and gets to setting up the database. I provide the db info. as usual and it proceeds as far the info. below and 'hangs' at this point , it never goes on to setup the PW login admin. and complete the install I am left at that screen.  
      If I relaunch the browser at the site it all seems to work! BUT I have no admin login to PW so cannot get into the backend. 
      I have basically followed the Installation, Moving and Troubleshooting guide by Joss Sanglier: http://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/page4
      Any idea where I could check for an error log or some help as I am at a loss as to the problem. 
      Many thanks. Paul
      ProcessWire 3.x Installer
       Test Database and Save Configuration
       Database connection successful to pinpoin1_master
       Saved configuration to ./site/config.php
       Profile Import
       Imported database file: ./wire/core/install.sql
       Imported database file: ./site/install/install.sql
    • By Marcel
      Hey, 
      I am very new to processwire and bootstrap. I have a field (text area) and there I want to be able to insert an image which is responsive. I tryed it with Source but in the end the page doesn't seem to like it when I insert in Source the following code
      <img src="<?php echo $homepage->content_img->url; ?>" class="img-fluid" alt="Responsive image"> What can I do to make it possible to insert reponsive images in a text area?
      Thank you in advance.
      Marcel
    • By Clément Lambelet
      Hi all,
       
      I'm really new to ProcessWire, maybe I missed the solution in the documentation.
      I'm working on a site which involves a lot of image upload fields, and I'm always getting many timeout errors. I'm pretty sure it's because I generate too many variations on a single page load (around 20 images with 7 different sizes, for them to be responsive).
      I can't use ImageSizerEngineIMagick to help (my host doesn't support it).
       
      I was wondering if there was a way to hook to the process of client-side image resizing (https://processwire.com/blog/posts/processwire-3.0.63-adds-client-side-image-resizing/) to generate the different variations (as it seems really faster). If not, is there a way to generate the different variations on upload and not on page load ?
       
      Any ideas and suggestions are welcome!
    • By rafaoski
      You can download and test from this address:  GITHUB-SITE-BS4 and this MODULES - SITE-BS4
      And I add a screenshot:

       
    • By abdus
      While I was reading Smashing Magazine, I discovered this handy tool called XRespond that lets you load webpages in iframes that are designed to simulate different devices, (similar to how browsers' mobile simulators work).
      I think it's quite useful for local development. In fact it works for any website as long as it doesnt have `X-Frame-Options` headers set to `sameorigin`. I highly recommend using it with browser-sync with live loading as well. I use this settings when using it with PHPStorm to live reload my dev site on pw.dev.
      // remember set cwd to /site/templates/ or call it from templates directory path/to/browser-sync.cmd start --proxy pw.dev --port 8080 --files "**/*.php" --files "assets/**/*.css" --files "assets/**/*.css"
      What other tools/utilities do you use for testing your responsive designs?
×
×
  • Create New...