Jump to content

Blue-VR ProcessWire Site Profile


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
Link to comment
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. 

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
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?

Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

  • 4 weeks later...

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 

Link to comment
Share on other sites

  • 3 weeks later...

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
Link to comment
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

Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...