Leaderboard
Popular Content
Showing content with the highest reputation on 12/15/2014 in all areas
-
A module that uses the db-ip.com IP Geolocation service to fetch geolocation information when given an IP address. I wrote this quickly to help anyone who might be stuck with the #VATMOSS mess and need a way to geo-locate a customer's IP address. You will need to register with db-ip.com in order to get an api key but they have a pretty generous daily-query allowance even for the free key (2000 lookups a day.) Here it is on github. And in the module repository.10 points
-
4 points
-
@mrkhan, Just want to clarify that you can pass a PageArray to MarkupSimpleNavigation as explained here: https://github.com/somatonic/MarkupSimpleNavigation#build-a-menu-using-a-pagearray-instead-of-a-single-root-page You are also not limited to a single menu per page. But feel free to use what works for you and you are comfortable with If you haven't already, also have a look at the PW docs here: Selectors: http://processwire.com/api/selectors/ Page: http://processwire.com/api/variables/page/ Pages: http://processwire.com/api/variables/pages/3 points
-
Not really... besides an uncle of mine that didn't know about the project and contributed after seeing us there (), we didn't notice any special activity. TV and internet don't play very well along. The web addresses are not clickable and it goes a long way from watching TV to getting to the computer, writing the web address (if you wrote it or remember it) and contributing. But we are sure it had a good longer term value. It creates memory, and people will know who we are and what we are doing when they come across the project at other times.3 points
-
The current page is always $page (you can assign something else to $page, but it's not a good idea). This means you can check if the page you are currently adding to the menu is the same as $page. Then you can modify the output accordingly. For example: foreach($page->menu_page as $item) { $activeclass = ($item == $page) ? 'active current' : ''; //If this is the page we are viewing, add the classes. Otherwise use ''. $out .= "<li class='top {$activeclass}'><a href='#'>{$item->title}</a>"; } If you want the parent pages to be highlighted in your multi-level menu as well, you can check if they're in $page->parents. $parents = $page->parents; foreach($page->menu_page as $item) { $parentclass = ($parents->has($item)) ? 'active' : ''; //If this is a parent of the page we are viewing, add the class. $activeclass = ($item == $page) ? 'current' : ''; //If this is the page we are viewing, add the classes. Otherwise use ''. $out .= "<li class='top {$activeclass} {$parentclass}'><a href='#'>{$item->title}</a>"; } Or something like that...3 points
-
@mrkhan, there seems to be a slight misunderstanding here. Your $pid isn't page ID, it's a Page. You don't need $pages->get() to grab the page, you already have it. // title of the page echo $page->page_side_menu->title; // URL of the page echo $page->page_side_menu->url; // body field of the page (assuming that it has field called body) echo $page->page_side_menu->body; // .. or, if you really want to store it in $paged first: $paged = $page->page_side_menu; echo $paged->title; See what I mean?3 points
-
I think Manaus is talking about "Name format for children" option under Family tab of the template when only 1 template for children is allowed. Availiable options are described here. But me too would want them to be more rich, maybe something like in this Adrian's module. Edit: Checked it out and did not find a way to combine date and title (with or without custom text in between). If anything but "PHP date format" is in the field we get what Manaus showed in his post: something like 15313431mondayeurope-moscow.3 points
-
Because of the $, $download_counter is a variable here. You’re not accessing the page field “download_counter”, but a field by the name of whatever that variable contains. You should also disable output formatting before modifying a field. Use $page->setOutputFormatting(false) or $page->of(false). Lastly, it’s possible to save just the field by calling $page->save('download_counter'). Untested: wireSendFile($page->download_file_link); $page->of(false); $page->download_counter = $page->download_counter + 1; $page->save('download_counter'); $page->of(true);3 points
-
Yes we do...OR-groups Both of these work for me (not sure if the second one is the better syntax though for this particular case): $test = $pages->find('template=basic-page, foo=(external_status=""), foo=(external_status!=accepted), sort=title'); $test = $pages->find('template=basic-page, (external_status=""), (external_status!=accepted), sort=title'); https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049 Related new(ish) selector, selector grouping https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=587222 points
-
2 points
-
I have a social network made in PW with +40k users registered, my solution was to create a template for the profile, having some important fields directly to the user template like gender, city (fields I can use for a search so it's good they stay inside user template) and additional info into the profile, linked to the user with a page field.2 points
-
Wire Mail SMTP An extension to the (new) WireMail base class that uses SMTP-transport This module integrates EmailMessage, SMTP and SASL php-libraries from Manuel Lemos into ProcessWire. I use this continously evolved libraries for about 10 years now and there was never a reason or occasion not to do so. I use it nearly every day in my office for automated composing and sending personalized messages with attachments, requests for Disposition Notifications, etc. Also I have used it for sending personalized Bulkmails many times. The WireMailSmtp module extends the new email-related WireMail base class introduced in ProcessWire 2.4.1 (while this writing, the dev-branch only). Here are Ryans announcement. Current Version 0.8.0 (from 2024-09-25 -- initial version 0.0.1 was pushed on 2014-03-01) Changelog: https://github.com/horst-n/WireMailSmtp/blob/master/CHANGELOG.md Downlod: get it from the Modules Directory || fetch it from Github || or use the module-installer in PWs admin site modules panel with its class name "WireMailSmtp". Install and Configure Download the module into your site/modules/ directory and install it. In the config page you fill in settings for the SMTP server and optionaly the (default) sender, like email address, name and signature. You can test the smtp settings directly there. If it says "SUCCESS! SMTP settings appear to work correctly." you are ready to start using it in templates, modules or bootstrap scripts. Usage Examples The simplest way to use it: $numSent = wireMail($to, $from, $subject, $textBody); $numSent = wireMail($to, '', $subject, $textBody); // or with a default sender emailaddress on config page This will send a plain text message to each recipient. You may also use the object oriented style: $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $mail->to($toEmail, $toName); $mail->from = $yourEmailaddress; // if you don't have set a default sender in config // or if you want to override that $mail->subject($subject); $mail->body($textBody); $numSent = $mail->send(); Or chained, like everywhere in ProcessWire: $mail = wireMail(); $numSent = $mail->to($toEmail)->subject($subject)->body($textBody)->send(); Additionaly to the basics there are more options available with WireMailSmtp. The main difference compared to the WireMail BaseClass is the sendSingle option. With it you can set only one To-Recipient but additional CC-Recipients. $mail = wireMail(); $mail->sendSingle(true)->to($toEmail, $toName)->cc(array('person1@example.com', 'person2@example.com', 'person3@example.com')); $numSent = $mail->subject($subject)->body($textBody)->send(); The same as function call with options array: $options = array( 'sendSingle' => true, 'cc' => array('person1@example.com', 'person2@example.com', 'person3@example.com') ); $numSent = wireMail($to, '', $subject, $textBody, $options); There are methods to your disposal to check if you have the right WireMail-Class and if the SMTP-settings are working: $mail = wireMail(); if($mail->className != 'WireMailSmtp') { // Uups, wrong WireMail-Class: do something to inform the user and quit echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; return; } if(!$mail->testConnection()) { // Connection not working: echo "<p>Couldn't connect to the SMTP server. Please check the {$mail->className} modules config settings!</p>"; return; } A MORE ADVANCED DEBUG METHOD! You can add some debug code into a template file and call a page with it: $to = array('me@example.com'); $subject = 'Wiremail-SMTP Test ' . date('H:i:s') . ' äöü ÄÖÜ ß'; $mail = wireMail(); if($mail->className != 'WireMailSmtp') { echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; } else { $mail->from = '--INSERT YOUR SENDER ADDRESS HERE --'; // <--- !!!! $mail->to($to); $mail->subject($subject); $mail->sendSingle(true); $mail->body("Titel\n\ntext text TEXT text text\n"); $mail->bodyHTML("<h1>Titel</h1><p>text text <strong>TEXT</strong> text text</p>"); $dump = $mail->debugSend(1); } So, in short, instead of using $mail->send(), use $mail->debugSend(1) to get output on a frontend testpage. The output is PRE formatted and contains the areas: SETTINGS, RESULT, ERRORS and a complete debuglog of the server connection, like this one: Following are a ... List of all options and features testConnection () - returns true on success, false on failures sendSingle ( true | false ) - default is false sendBulk ( true | false ) - default is false, Set this to true if you have lots of recipients (50+) to ($recipients) - one emailaddress or array with multiple emailaddresses cc ($recipients) - only available with mode sendSingle, one emailaddress or array with multiple emailaddresses bcc ($recipients) - one emailaddress or array with multiple emailaddresses from = 'person@example.com' - emailaddress, can be set in module config (called Sender Emailaddress) but it can be overwritten here fromName = 'Name Surname' - optional, can be set in module config (called Sender Name) but it can be overwritten here priority (3) - 1 = Highest | 2 = High | 3 = Normal | 4 = Low | 5 = Lowest dispositionNotification () or notification () - request a Disposition Notification subject ($subject) - subject of the message body ($textBody) - use this one alone to create and send plainText emailmessages bodyHTML ($htmlBody) - use this to create a Multipart Alternative Emailmessage (containing a HTML-Part and a Plaintext-Part as fallback) addSignature ( true | false ) - the default-behave is selectable in config screen, this can be overridden here (only available if a signature is defined in the config screen) attachment ($filename, $alternativeBasename = "") - add attachment file, optionally alternative basename send () - send the message(s) and return number of successful sent messages debugSend(1) - returns and / or outputs a (pre formatted) dump that contains the areas: SETTINGS, RESULT, ERRORS and a complete debuglog of the server connection. (See above the example code under ADVANCED DEBUG METHOD for further instructions!) getResult () - returns a dump (array) with all recipients (to, cc, bcc) and settings you have selected with the message, the message subject and body, and lists of successfull addresses and failed addresses, logActivity ($logmessage) - you may log success if you want logError ($logmessage) - you may log warnings, too. - Errors are logged automaticaly useSentLog (true | false) - intended for usage with e.g. third party newsletter modules - tells the send() method to make usage of the sentLog-methods - the following three sentLog methods are hookable, e.g. if you don't want log into files you may provide your own storage, or add additional functionality here sentLogReset () - starts a new LogSession - Best usage would be interactively once when setting up a new Newsletter sentLogGet () - is called automaticly within the send() method - returns an array containing all previously used emailaddresses sentLogAdd ($emailaddress) - is called automaticly within the send() method Changelog: https://github.com/horst-n/WireMailSmtp/blob/master/CHANGELOG.md1 point
-
Introducing ProcessWire ProFields: Table – it lets you literally define your own Fieldtype! This is one of the most exciting ProFields and it's something very different than any other Fieldtypes. I think it is best described by this screencast (be sure your sound is on): Special thanks to Joss for his great voiceover on this screencast. Please view the video at 720p and full screen if possible. Read more about the Table Field Table is part of the ProcessWire ProFields package now available for purchase in the ProcessWire store.1 point
-
I think this idea has come up a couple of times in other threads, but this is just to rationalise it a little. Currently, the Page Table works rather like a repeater in that it is a way of adding and arranging new content in sections via a field. However, because it works in a more public way (the pages created can be arranged within a publically accessible part of the tree rather than buried under admin), the potential for the field is greater than with repeaters. Primarily, there is the opportunity for the field to have the characteristics of a page field. Take this case: A complex, technical article about using Processwire will be much improved by the use of additional information in the form of asides. Using a page table, it is possible to create the five or six asides needed, sort them into the right order and then insert them into the right places using hanna code. (the hanna code could either call them using their key in the array, or by title or by page id, even - if it were displayed) However, in such an article, it would be also very useful to use an existing aside. For instance, the nice aside "what is php?" might be very useful. But that does mean that it needs to be selected from the existing stock and that is not currently possible with a page table, though it is possible with a page field. What it looks like If the functionality were added to the page table field, this is how I would see it being used in practice: On the creation of the page table field, under the option for selecting a parent, a check box is added "allow selection of existing page" When using the field on a template, where currently you have "Add New" at the bottom of the field you now have a second button "Select" This opens up a lister in a modal window where you can select one or more Asides from the given parent as set in the field. These are then added to the list of asides in the field. Preventing Editing One of the dangers of such a system is that the content of a page called by a page table might be edited out of context. Back to our field! A third checkbox says "prevent editing if used in more than one page." Basically, if our aside is used in more than one page it can no longer be edited from the page table field. The only way it can be edited is by going to the page directly as normal via the page tree, and that might be subject to permission restrictions. There may also be a situation where asides are created in their position within a page tree and the ability to edit them via a page table is completely removed for everyone. Perhaps that is an automatic feature where the aside is created via the page tree and not via a page table field. However, in this case where an aside is not editable, another option may be available: Cloning Another possibility is the idea of New from Old. for instance, I want to use that very good aside about what is PHP but I want to add my own relevant information. In this case I can choose my starter aside and click on "Create New from this aside" in the lister modal. A new aside will be created using the same template and the same content which I can then edit. Limiting Inclusion There are situations in this case, however, where an aside has content that is really limited to that one article and should not be reused. (Legal reasons, perhaps, or just simple editorial context). Back on the field settings there would be another check box "allow limited use" Now, when as Aside is created, on the modal window in the Settings tab it has a checkbox that says "Limit to this article only?" This Aside can now not be selected for use by another article. Other Uses Using this modification as an aside is a very basic example, but there are probably hundreds of others. For instance, product variations or attributes in e-commerce where certain variations need to be available to a range of products. With e-commerce, the various restrictions about editing and limiting inclusion would become very important. So there you go, a lot more power and uses. (Note: this might be the wrong starting point, of course, as it could be argued that this should be a modification of a page field!)1 point
-
I recently created an ecommerce website, iBuildMacs, that I built with ProcessWire. Given that there's been quite a bit activity on combining ecommerce with ProcessWire, I feel many people would be interested in the approach I took. Feel free to visit it at: http://ibuildmacs.com/ The requirements for this site were: a computer configurator, much like the Apple website; example product page here cart checkout payment methods: paypal or check/cash shipping methods: the cost of shipping is based on a fixed cost that is related to the country being shipped. no live quotes The requirements did NOT include: tax rules inventory management coupons, gift certificates different product types: simple products, variable products, digital/downloadable products, etc. user accounts, address management a fancy ajax driven checkout So, I had a bit of flexibility for this site given the specific feature set. I then thought about how I wanted to develop the site. The options I considered included: WooCommerce: I've built several intricate websites with WooCommerce, the most recent being caviar.com. It was good fit that website, but for iBuildMacs, which has less requirements and a very unique product configurator, which WooCommerce could do but with a tremendous amount of overrides and working backward, I decided this wouldn't but the right fit. Plus, I'm trying to become as WordPress-free as possible. FoxyCart: A ProcessWire favorite, however I wanted to challenge myself a little bit with this site, and also keep things under one roof. Magento, Shopify, (insert some specific heavy or cloud-based ecommerce system you like): No. Overkill and making a product configurator would be a pain. After considering my options, I felt just rolling it entirely with ProcessWire and programming the catalog, payment methods, shipping methods and checkout tailored to the site's specific needs was the way to go. This would definitely reduce the time and headache needed in bending anyone of the above systems I mentioned to behave exactly the way I wanted it to. Products This was one of the complicated parts of the website, but ProcessWire, with its infintely flexible custom fields, made this a breeze. I have a product template (product.php). It has some general fields like Title, Body, Image and Base Price. It also has a PageTable field called Features. These features are child pages of the product and use feature template (feature.php), so the Features PageTable field just grabs its data from there. Then, the feature template has some general fields like Title, Body, Image and PageTable field called Feature Options. These feature options are child pages of the feature template using the feature option template (feature_option.php). So, what I ended up having is a 3 level deep structure, with two nested PageTable fields. Here's a video of what it looks like, which is quite slick is very easy to manage: https://vid.me/kjDW Cart When a user adds a configured product to their cart, it must be stored somehow and I thought of a variety of ways to do this. Ultimately, I decided that cart data is handled as a page (using the order.php template) undernearth /orders/. This order.php template has a page name that is based on the session id of the user, so it'll remain unique and not cause a conflict with other people's carts (as well as obscure from people trying to guess it's url, which is used for the order confirmation page). One of the fields in this order.php template is called "products_ordered", which utilizes the Table fieldtype (a Profields table). Video: https://vid.me/MIRl Checkout The checkout is a straight forward form with the basic questions. However, the shipping section is where it gets tricky. The requirements for this site were that each computer has a fixed shipping price depending on the method being used to ship. The shipping methods available to a customer are dependent on their country. I think WooCommerce could manage rules like that, but directly coding it wasn't that difficult. I create an array that stored the 2 payment methods, and another array that stored the 6 total shipping methods. I also have an array for all the countries. I then wrote some JavaScript that managed the relationships between the country chosen and the shipping methods available for the chosen country. When choosing a method, it will update the Shipping cost line item on the car to the right. Just basic JavaScript going on here. All nice and on one page. When the submit button is pressed, it will run through some logic and validate all the data and save it to the same page that stored the cart data. An order confirmation email is sent to the customer, and one is also sent to the admin (SwiftMailer). If Check/Cash was chosen, the user is then simply forwarded to the order confirmation page, which is at /orders/whatever-their-page-name-was-saved-as/. The email they are sent also has a link referencing this page. If PayPal was chosen, a URI is built and the user is taken to PayPal complete payment with PayPal Payments Standard using the Cart Upload command. Documentation here. After they complete Payment on PayPal, they are then taken to the order confirmation page as described previously. Video: https://vid.me/hwfB I will eventually be using ListerPro for a nicer admin orders list display and build a few custom actions to allow administrators to quickly send general emails from the system (like, when the order is shipped). Modules Used Admin Template Columns: http://modules.processwire.com/modules/admin-template-columns/ Markup Simple Navigation: http://modules.processwire.com/modules/markup-simple-navigation/ Maintenance Mode: http://modules.processwire.com/modules/maintenance-mode/ Batcher: http://modules.processwire.com/modules/process-batcher/ Form Builder (for the contact form only): https://processwire.com/talk/store/category/2-form-builder/ Swift Mailer: http://modules.processwire.com/modules/wire-mail-swift-mailer/ PageTable field type ProFields Table: https://processwire.com/talk/store/category/7-profields/ ListerPro (eventually): https://processwire.com/talk/store/category/9-listerpro/ Enjoy!1 point
-
ummmm Didn't really look - I saw it because it is being used for a woocommerce plugin for the vat moss thingy1 point
-
depending on your PW version: before 2.5: https://processwire.com/talk/topic/2942-or-in-pw-selectors/#entry29001 Hhm, cannot find it, but I could swear there is support for OR operators in selectors now in 2.5. Sorry, you need to search for it by yourself, maybe in the http://processwire.com/blog section. Or if someone reads this: do we have support for OR operators in PW 2.5 now? Where can we read about it?1 point
-
Looks like this could come in handy. Just recently wrote a snippet to do the same via ipinfo.io, but db-ip.com seems to be at least cheaper. Do they provide HTTPS support, or is it just plain HTTP? Didn't see that in the docs Also, is there particular reason not to use WireHttp? Mostly out of interest; probably won't matter much in real use.1 point
-
I don't understand clearly what you want. If you want to create a page by API inside a template you can do this: $p = new Page(); $p->template = 'basic-page'; $p->parent = $pages->get(1); $p->name = date('Ymd').'-my-url-title'; $p->save(); to get a page with a specific name use: $pages->get('20141214-my-url-title'); //or $pages->find('20141214-my-url-title'); Does this help? If not please explain more clearly what you want to do.1 point
-
1 point
-
I take it you don’t want to show the date the page was created? That would be $page->created. $page->sort gives you the zero-based sort index, but it’s only unique in relation to the parent. This might be the closest to your requirement. $page->id is not necessarily consecutive and starts at 1000, but it’s unique site wide. I believe ProcessWire doesn’t reuse deleted IDs, so they should reflect the order of page creation. However, every new admin page and repeater item will increase this number. Do with that what you will.1 point
-
There's a video from Erika and me in the Portuguese television talking about the muesli project. It's in Portuguese but enjoy https://www.facebook.com/mueslicafe/posts/15520980183357751 point
-
solved: i failed to put the full folder of the getid3, i had just copied only the main class file.. major facepalm @adrian - forgot to thank you for helping.. (was actually replying to your post when the solution dawned on me..) by the way, this is pretty awesome, now i can read id3 tags and create pages based on those tags; also prevent users from uploading mp3 files where the bitrate is too high (in order to keep the filesizes small we use 128 for streaming files)...1 point
-
I like the idea of a having a module(s) available for docs. Even though there are so many ways of building sites with PW there must be a solid basis for docs in module form? Maybe have a custom content input Field for site developers and end site editors that would allow them to customize specific site details. In the end I think such a system might be a welcome time saver for busy site developers. Documentation always seems like the unwanted guest at the (open source development) dinner party. Making it easier, more concise and effective is a real plus in my book.1 point
-
1 point
-
Hi Peter, I'm not sure if the selector engine has something to take care of this in a more straightforward way now but let's see if I'm able to help you with this approach anyway. Looks like you're not saving the results of your find() calls into variables. Check my example you're referring to: I'm using $results and $additionalResults to hold the found pages and import the contents of $additionalResults to $results. And remember $pages is a system variable you shouldn't be saving anything to yourself. On top of that, it would be better to find unattached domain_ip's first and import only one page (which you don't have to find by the way), not the other way around. Something like this would probably work: // find free ip's $selectable_domain_ips = $pages->find("parent=/domain_ips/,server_id=$page->server_id_select, include=hidden, account_id="); // add currently selected one to the list $selectable_domain_ips->import($page->domain_ip_select); return $selectable_domain_ips; It seems you've got a two way relation here - or do you really? For this to work you'd have to take care of (un)setting account_id of domain_ip pages yourself. If you've got that set up and working already you should be fine. If not, I'm sure someone here will help you get there (or suggest a whole another approach to make it simpler). I'm a bit rusty myself not having done anything with PW or PHP in months.Hope this helps.1 point
-
See these examples: http://processwire.com/api/variables/pages/ https://processwire.com/talk/topic/1153-adding-images-to-a-page-via-the-api/ https://processwire.com/talk/topic/1153-adding-images-to-a-page-via-the-api/?p=10334 https://processwire.com/talk/topic/206-renaming-uploaded-files-from-tmp-name/#entry13711 point
-
It's pretty pricey for a small tool, but every once in a while, you can find Better Rename discounted or in a bundle. Doesn't do random strings as far as I know, though.1 point
-
I'm pretty sure that those things can be done already. Styling the Pagetree can be done with a CustomModule like here: https://processwire.com/talk/topic/5609-display-a-template-icon-base-on-date-field/ And to get a list of all pages by certain criterias (template, parent, empty fields etc.) can be done with Find / Lister:1 point
-
Bingo My assumption from my previous post was right. The PWimage plugin needs a hidden text input field with the value set to the page id of the page that you want to grab images from. I added a hidden input field to my form with $imgPageID = $pages->get("template=media, created_users_id=$uID")->id; $field = $modules->get("InputfieldText"); $field->label = " "; $field->attr("id+name","Inputfield_id"); $field->attr("value",$imgPageID); $field->attr("type","hidden"); $adform->append($field); Now I can choose images from the user's images page And there is no custom module with hook to ProcessPageEditImageSelect required. EDIT: This only works for PW 2.5. For 2.6.x some adjustments are needed. You'll find more info here1 point
-
I love you Soma Here's a more detailed example - again, this code needs to go in a Process module public function execute() { // This is our outer wrapper $outerWrapper = new InputfieldWrapper(); // This will be our first tab $tabOne = new InputfieldWrapper(); $tabOne->attr('title', 'Tab 1'); // I'm using InputfieldMarkup as I just want to output HTML - could be a form, some fields etc, but since I only just realised what InputfieldMarkup actually does (d'oh!) I'm going to use it lots! $markup = $this->modules->get('InputfieldMarkup'); $markup->attr('value', "And I'd have gotten away with it..."); // Append the markup to tab one $tabOne->append($markup); // Append this tab to the outer wrapper $outerWrapper->append($tabOne); // Here's another tab $tabTwo = new InputfieldWrapper(); $tabTwo->attr('title', 'Tab 2'); $markup = $this->modules->get('InputfieldMarkup'); $markup->attr('value', "...if it wasn't for those pesky kids!"); $tabTwo->append($markup); $outerWrapper->append($tabTwo); return "<div id='MyTabs'>" . $outerWrapper->render() . "</div>"; } And again, you need Soma's JS in your module's JS file: $(function(){ $t = $("#MyTabs"); $t.find("script").remove(); // to avoid double script execution $t.WireTabs({ items: $("#MyTabs > .Inputfields > .InputfieldWrapper"), id: 'ProcessExampleTabs' }); }); Lovely job1 point
-
Microdata is always good to have, thanks for sharing this! Personally I wouldn't depend too much on data-vocabulary.org though. Their home page makes it pretty obvious that schema.org is the new toast of the town. With schema.org vocabulary breadcrumbs could be implemented like this: <body itemscope itemtype="http://schema.org/WebPage"> ... <div itemprop="breadcrumb"> <?php foreach($page->parents as $parent) { $end = ($parent === $page->parent) ? "" : " > "; echo "<a href='{$parent->url}'>{$parent->title}</a>{$end}"; } ?> </div> <!-- this follows strictly schema.org example --> Or with markup matching above example: <body itemscope itemtype="http://schema.org/WebPage"> ... <div class='breadcrumb' itemprop='breadcrumb'> <?php foreach($page->parents as $parent): ?> <li> <a href='<?php echo $parent->url; ?>'> <span><?php echo $parent->title; ?></span> </a> <span class='divider'>›</span> </li> <?php endforeach ?> <li> <?php echo $page->title; ?> </li> </ul> <!-- this isn't exactly what schema.org describes but should still be valid.. --> There's quite a bit of discussion floating around whether schema.org version of breadcrumbs is actually useful, but it is what their example currently suggests. Note also that breadcrumb is a property of WebPage, ie. you'll have to be in that context in order to use this properly.1 point