-
Posts
2,862 -
Joined
-
Last visited
-
Days Won
47
Everything posted by Joss
-
How to get round problems with form builder with this module? It is throwing errors both on saving a form and when I submit the form on the site - though the form is working. Notice: Trying to get property of non-object in /home/claysvehiclerepairs/public_html/site/modules/TextareaCounter/TextareaCounter.module on line 50 Notice: Trying to get property of non-object in /home/claysvehiclerepairs/public_html/site/modules/TextareaCounter/TextareaCounter.module on line 58 Notice: Trying to get property of non-object in /home/claysvehiclerepairs/public_html/site/modules/TextareaCounter/TextareaCounter.module on line 66 Thanks!
- 67 replies
-
- Inputfield
- UI
-
(and 2 more)
Tagged with:
-
Hi Dazzyweb I think that often depends on what the competition does. With music, I would love to charge for demos and then do some discounting on the final version. The trouble is that none of my competitors do that and so I would quickly lose business. It is right pain actually - I spend a huge amount of hours each year doing demos that come to nothing.
-
Okay, just add complication... On some pages I have a select that just selects a block, so: $block = wire("page")->block_single_select; Those dont have a problem. On other pages, they are getting their blocks from a central setting: $block = wire("pages")->get("/servicing/")->block_single_select_manufacturers; Those fail unless I turn them into multi and call them like: $block = wire("pages")->get("/servicing/")->block_single_select_manufacturers->first(); That works. ########### part of the problem here is this was meant to be a very simple site and has become very complicated. I will write a case study called: "How to over complicate a solution and end up building a site that is worth far more than the client will actually be paying"
-
Okay, I have found a solution. If I make it a multi field, but use just a single select drop down and then change my Get to include first() it works. So, as long as its part of a wirearray I am okay. Makes me want to shudder! I had the same problem with another version of the field that is in a different part of the system - it did the same thing, but was set for a different list.
-
Actually, it is even more odd than that. I cant link to anything in the same branch of the tree. However, the other group of block, which are a multiselect field and therefore are within a foreach, have no problems
-
Well, I changed the link and it all went away... So, I dont know.
-
SOLVED IT - er, I think The problem is that if the block link is pointing to the same page as the block is being displayed on, then it fails - which is why I was getting a 500. So, I am going to have to work out a check here of some sort to see if $block->block_link->name is the same as the last bit of the url of the page. grief!
-
Okay, it looks like I am all backwards on this. Sorry, tried so many variations I am getting lost. It appears to go wrong when there IS a link chose. Actually, there seems to be some problem with $block->block_link->url all on its own.
-
This also does not work: if(!($block->block_link instanceof NullPage) ){ }
-
No, still gives me a 500
-
er ,,,,,, Its a Null Page single (well, you only get a page at a wedding so if you are single you haven't got one in the first place) I have tried with both. Mind you, haven't tried isset with boolean false... yet.
-
@interrobang Nope. This is how the entire thing works. Have a page field used for selecting a single block That is fine. The block template has a page field for selecting a link to a particular other page. I want it so that if a link is selected then a nice button shows. But if it isn't, nothing shows. The same code works fine inside a foreach loop for choosing multiple blocks, but fails when I use it to select just a single block with a single select. Here is the full code: function singleBlockServiceModels(){ $block = wire("pages")->get("/servicing/")->block_single_select_models; $color = $block->block_bgcolour; $rgba = hex2rgba($color, 0.5); $thisanchor = "#{$block->block_anchor}"; $out =""; $out .="<div class='columns block-container sinlge-block' style='background-color:{$rgba};' data-equalizer-watch>"; if($block->block_show_headline){ $out .="<div class='block-header'>"; $out .="<h4 class='text-center'>{$block->block_headline}</h4>"; $out .="</div>"; } if($block->block_image){ $out .="<div class='block-image'>"; $out .="<img src='{$block->block_image->url}' alt='{$block->block_image->description}'>"; $out .="</div>"; } $out .="<div class='block-body'>"; $out .="{$block->block_text}"; $out .="</div>"; if($block->block_link->url){ $out .="<div class='block-link text-center'>"; $out .="<a href='{$block->block_link->url}{$thisanchor}' class='readmore-button '>Find Out More</a>"; $out .="</div>"; } $out .="</div>"; // column echo $out; } Oh, the rest of it works if I remove the if statement at line 23 onwards
-
Single (I am not a morman)
-
UPDATE: I have now changed the title of the post because the situation got more confused and the problem worked out differently. The problem has not been solved, and there is a better breakdown of the issue here: https://processwire.com/talk/topic/8231-check-if-page-field-is-set/?p=80520 ###################### Original post: I have no idea what is wrong with my brain today. I am using a page field to generate a link in a block. If a page is not selected, I dont want to show the linking markup. So, how do I check whether it has been set or not? Just doing if($block->page_field) throws an internal server error. if(isset doesn't seem to do anything. nor does if(empty so... ? Help! EDIT: This is not in a loop, by the way
-
Patron Saint of Firefighters and soapmakers http://en.wikipedia.org/wiki/Saint_Florian Always said you were wonderfully saintly, Soma!
-
If speed is not an issue, it might be something to do with easing that the iPad browser does not like very much. If you can change what sort of transition is happening and try a simpler one, that might give you a clue as to what is happening.
-
Do you know whether it is not so smooth because of connection speed or some other reason.
-
Oh, in advertising we rely on it. And there is no doubt that if all the edges are neat and the surfaces are polished then people will have more confidence in the product, as it were. There is actually good sense in that - it is not all frothy dressing. Back in the 18th and 19th centuries, in retail, it became clear that if the shopkeeper cared for his shop then there was a good chance he cared for his product too. Customers felt that, by extension, perhaps he would then care for them and their custom. It was not always true, of course, but not a bad starting point!
-
I think you may have some problems here. Do you mean you would like more space between paragraphs? Other than adding another blank paragraph in between (just press return at the end of a line) the actual setting for this is not being done by the editor at all, but by the back end scripts. When it comes to justify, have you got the justify buttons showing on the editor? If not, this means a plugin has to be installed as this is not part of the default installation. Looking at the design, I would avoid underlining - it wont be in keeping with the design of the site and will look out of place. I think you would regret that, to be honest.
-
Background colour probably will not work in your case because it wont affect the container on the front end of the site. Text colour should, however. Looking at one of my own, I have just added TextColor to the toolbar row as shown above and that works. After you save the field and you reload the page you are trying to edit, is the Text Colour button showing?
-
I agree with the other two. If your webmaster has set up fields as textareas without more powerful editing, that means they are intentionally avoiding colours, text sizing and so on because it will mess up the page. How the text looks is being controlled by the css styling, not by the text field. That is a good way of doing things, it can save a lot of things getting very messed up! Diogo is right - the site is nice. If possible, I would strongly suggest just using the fields as they are for the moment. If you mess the layout, you will really kick yourself. Which page are you trying to edit and in what way? Also, if your webmaster designed the site, who is he/she? They may be a regular here.
-
Interesting. But I wonder if it is quite as "intelligent" as they like you to believe? Will each site look completely unique? Or will they all look like they were a product of The Grid? I like their presentation, though. Has a real "advertising agency" feel to it. Hi value presentation does make a whole lot of difference, whatever people may think. I often make this point to advertising clients who say "well, we don't really want that slick feel that the big players have - it's just not us." I tend to answer, "Why not? Your customers like it....."
-
Best approach: Repeatable fields Vs separate PW pages
Joss replied to Peter Knight's topic in Getting Started
Aw shame, you could always go and use Drumlapress......