Peter Knight
Members-
Posts
1,384 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Peter Knight
-
Best approach: Repeatable fields Vs separate PW pages
Peter Knight replied to Peter Knight's topic in Getting Started
Cheers Joss. You're right re. scalability. I was getting hung on "the simplicity" of the first approach (which uses PageTable). What I should be doing is making a simple template called "studio-update" with just my body field as date can be handled by the page creation date. Later on, I can add and remove fields if requirements grow. Or I could even have a Blog for this where posts for Updates are simply tagged "update". They could then be hidden from the main blog secton but displayed on their own "updates" page. Too much choice. That's my problem -
Best approach: Repeatable fields Vs separate PW pages
Peter Knight posted a topic in Getting Started
I have a feed of "studio updates" on a site. They're essentially 1 liners of plain text. Using the ProField called Table, I've setup a simple repeatable table of fields consisting of a date and an update. The mechanism above works perfectly and I know I'll get a lot of mileage from it. I don't need the complexity of a blog for this or comments, categories and tags. Or at least I don't need that stuff right now. BUT... I wonder if I should at least consider something a bit more scalabale. I have a niggling sense that I should look at each entry as a seperate PW page and consider the fact that I *may* need some entries to include RTE fields, link to pages and even feature a photo. I don't need that functionality *right now* but right now is actually the best time to build it in? I suppose I already know the answer is to think ahead and think scalable but I liked the simplicity of having a single page with my repeatable fields within this. What would you do? -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Peter Knight replied to Nico Knoll's topic in Modules/Plugins
I'm pretty sure MarkupSEO is causing issues when viewing form results generated by FormBuilder. I posted the issue in the Form Builder Support but in case anyone isn't a member (VIP forum), here's the details. Error on viewing FormBuilder entries Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php line 247) #0 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(284): Selectors->create('1.2', '', '') #1 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(81): Selectors->extractString('1.2') #2 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(165): Selectors->__construct('1.2') #3 [internal function]: Pages->___find('1.2', Array) #4 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(389): call_user_func_array(Array, Array) #5 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(344): Wire->runHooks('find', Array) #6 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Wire->__call('find', Array) #7 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Pages->find('1.2', Array) #8 /home/sites/pretend This error message was shown because you are logged in as a Superuser. Error has been logged. Ryan's suggestion Uninstalling MarkupSEO makes the FB entries viewable again. -
MarkupSEO - The all-in-one SEO solution for ProcessWire.
Peter Knight replied to Nico Knoll's topic in Modules/Plugins
Google hasn't used Keywords as a ranking metric since 2009-ish. Here's the offical post from Google. I think the keywords field should stay. Clients are hard-wired into believing that Keywords matter because they did for so long. Not having a Keywords field could negatively impact first impressions from some clients. As someone else mentioned, other Search Engines might have their own policies re. keywords. I'm not an SEO professional. For anyone wondering where the focus should be, the two most important ranking factors used by Google are: Quality incoming links from relevant sites. Quality is the key here and 3rd party sites themselves must have a good reputation. Relevant, quality content that is updated and shareable. I think in total there are thought to be around 200 "signals" which Google ultimatelty uses to determine ranking. Any SEO pros on here to confirm? -
More a reflection on my PHP noob-ness. Somtimes you discover *a* way to do something, stick with it and don't realise it may not best practice. 's all
-
@cmscritic - I really hope you get some great feedback here and CMS Critic becomes even better as a result. Much respect for the website and the amount of energy and commitment it must take to make it fly. That CMSCritic is built on PW and you gave a wonderful case study is even better The problem for me when I visit CMS Critic is that I want to read some content yet the advertising is constantly fighting for my attention. As a result, I rarely visit and when I do, I rarely hang around and browse. I literally don't know where to look as the nice design and visual hierarchy of content is overtaken by shouty Ads. By chance I came across this site earlier and immediatley thought of your problem. I noticed how the three navigation, advertising and content columns are handled differently and wondered if it was an option. http://www.1stwebdesigner.com/tutorials/custom-php-contact-forms/ Because the advertising column on the right (on a desktop) has that nice light grey background, there's a subtle but effective distincition between the advertising and the content. Since the content is on the white background, I immediately understand that this is where my attention should be. I don't have to think about it - it's just intuitive and actually, the advertsing doesn't bother me as much. Anywho, I'm not looking to make more for anyone but maybe this is something useful.
-
@Soma Slightly off topic but is your Avatar taken from the original Unreal game for the Mac?
-
That would/should work and it'd mean shorter anchors as some of my names are 20 words long :-/
-
Foundation (and Bootstrap) don't really care what CMS you use once you can adhere to their CSS. Likewise, a good CMS such as PW doesn't care what responsive framework you choose either. Customer reviews Is that currently a WordPress widget which then pulls in the G+ reviews? social share Have you looked at some of the off-the-shelf social widgets such as http://www.addthis.com/ ?
-
This is very interesting to me. I got it working. I'm not sure if its Foundation which doesn't like having an integer as the target or wether it's a PW issue. In the end, I had to switch to name <a href=\"#{$faq->name}\">{$faq->title}</a> instead of id <a href=\"#{$faq->id}\">{$faq->title}</a> Here's my full code. I'm not using an active class but that doesn't matter right now. <?php echo "<dl class=\"accordion\" data-accordion >"; $faqs = $pages->find("template=faq-detail"); foreach ($faqs as $faq) echo " <dd class=\"accordion-navigation\"> <a href=\"#{$faq->name}\">{$faq->title}</a> <div id=\"{$faq->name}\" class=\"content\"> {$faq->faq_body} </div> </dd> "; echo"</dl>" ;?> Hopefully someone else will have the same issue and find this thread
-
Because my page names are based on FAQs, they resulted in massive URLs so I stuck with the ID method. Nice to have so much flexibility though.
-
Yep. Pulling in the ID and applying it to each FAQ. I also tried some raw code from the Foundation site and can confirm the toggle actually works and the Toggle.JS is working on that page.
-
I was just wondering the same My faq->id is working and my echos are er, echo'ing but clicking on an Q doesn't toggle the A right now.
-
@Joss They're quick alright. If you look at the "who's reading this topic", they're like seagulls on a hot chip variable in summer.
-
Of course! There's me assuming it needs to be complicated :-/ I had tried page->title but that was massive. Hadn't thought of ID as I only use them in MODX
-
Im working on an FAQ section for a client. It's using Foundations Accordian JS so you click a Question and it toggles the Answer. You know the deal. The tricky part for me is when looping through my FAQs, I need to assign each anchor and target div with a unique number. Been trying to set a variable at one and then incrementally add a number per each FAQ. Wondered if my syntax was wrong or if there are more basic issues with the $x=1 idea. <a href='#$x++'>{$faq->title}</a>; <div id='$x++' class='content'> My working code (apart from the $x++) <?php $x=1; // Start a fairyball at 1 $faqs = $pages->find("template=faq-detail"); echo "<dl class='accordion' data-accordion>"; foreach ($faqs as $faq) echo " <dd class='accordion-navigation'> <a href='#$x++'>{$faq->title}</a>; <div id='$x++' class='content'> {$faq->faq_body} </div> </dd> "; echo"</dl>" ;?>
-
How to convince old client to swith from EE to PW?
Peter Knight replied to OrganizedFellow's topic in Pub
Agree. I think you're all nuts. Thankfully I'm not allergic to nuts. Here's another thing my old boss used to say to me : "Pete me auld flower. That's not just allowed. That's in fact encouraged". Stay nuts -
@GuruMeditation The tone of this thread could rapidly diminish!
-
Yep - You just bet me too it. I eventually tried creating a variable first and then passing the value to the echo thingy. BTW, re. variables - my wife came into the office yesterday and I must have looked particularly grumpy. The conversation went kind of like this: Her: whats wrong? Me: oh...just bloody variables Her: Bloody fairy balls? I thought you were having ProcessWire problems! Well, it made me laugh and got rid of my grump.
-
I have an image field as follows: Max files allowed = 1 Formatted value = Automatic Inputfield = cropimage If I follow the instructions here, this needs to be my echo call <?php echo $page->photo_for_course->getThumb('crop-for-course-detail'); ?> But this just outputs the fullpath as a string. The documentations states that "getThumb returns url to the thumbnail you have asked for". So I then thought I needed to tag an ->url on the end as follows <?php echo $page->photo_for_course->getThumb('crop-for-course-detail')->url; ?> It's not a first() issue as the file only allows for one image so Im a bit stuck. I've achieved this before but was using the $pages API and had a foreach loop. Surely I don't need to foreach here as I'm only using a single image? Thanks in advance. I feel like it's you guys that are building this site :-/
-
Thanks Adrian. In this instance there are multiple values so all is cool in looping land.
-
Making progress. Because each field must be an array, it appears I do need to loop through each. This is working but perhaps not the way I *should* be solving it <?php $course_level = $page->course_detail_level; $course_category = $page->course_detail_category; $course_grouping = $page->course_detail_grouping; $course_prerequisite = $page->course_detail_prerequisite; $course_writer = $page->course_detail_writer; $course_lessons = $page->course_detail_lessons; foreach($course_level as $level){ echo "<strong>Level:</strong> {$level->title}";} foreach($course_category as $category){ echo "<strong>Category:</strong> {$category->title}";} foreach($course_grouping as $grouping){ echo "<strong>Grouping:</strong> {$grouping->title}";} foreach($course_prerequisite as $prereq){ echo "<strong>Prerequisite Course:</strong> {$prereq->title}";} foreach($course_writer as $writer){ echo "<strong>Writer:</strong> {$writer->title}";} foreach($course_lessons as $lesson){ echo "<strong>Lessons:</strong> {$lessons->title}";} ?>
-
How to convince old client to swith from EE to PW?
Peter Knight replied to OrganizedFellow's topic in Pub
On the National Geographic case study, I found it interesting that the developers moved the whole site to ProcessWire in the background and *then* brought this up with the client. Had they asked if they could move from Drupal to PW, the answer would likely have been negative. Perhaps a risky strategy for some but as my old boss once said: "Ask for forgiveness. Don't ask for permission" -
I've created several fields and want to output their values on my page. Normally, the following works fine <?=$page->field-name-here?> For my latest fields this doesn't work and is instead outputting an integer (which I imagine is the page number). <h4>Course Details</h4> <strong>Level:</strong> <?=$page->course_detail_level->title?><br /> <strong>Category:</strong> <?=$page->course_detail_category?><br /> <strong>Grouping:</strong> <?=$page->course_detail_grouping?><br /> The above fields are mostly all based on a Page type and then an input field type of AsmSelect. I imagine my issue is that I am therefore dealing with an array and need to create a foreach statement?