Leaderboard
Popular Content
Showing content with the highest reputation on 03/12/2013 in all areas
-
Thanks Antti. I merged your pull request. All seems to be working well after a brief test. Not sure why, but the 'Source' option still doesn't work in inline mode, even though they apparently fixed that in 4.1. The problem is it isn't semantic. It's one of those things that technically belongs with a site's styles rather than in the RTE. I'm hesitant to have anything non-semantic in our default set. This could be a good idea for the future, so I'll make note of it. But the scope of it would stretch beyond just the CKEditor module, so this is something I'd like to revisit later.3 points
-
Just made pull request to update this for using ckeditor 4.1. It's automatic content cleaning is just fabulous. There might be cases (is there?) where we want to allow elements pasted that are not available from toolbar, then we need a setting for that. Still few minor quirks with image field (loses possible link when changing alignment).3 points
-
Simplest solution may be this: <?php $ul = str_replace('<ul>', '<ul class="half">', $page->finplan_assistance_list_items); echo $ul; ?> You could also set the class with javascript. Or copy the Textformatter module from /wire/modules/ in /site/modules/ - give it a new name, modify the code to your needs, install and use it.3 points
-
Okay this was very short notice so it is incredibly rough! But this is for Diogo and all those others wedded to PW http://21stcenturyblues.co.uk/pwdream1.mp3 (Organized, try listening at less than 120db!)3 points
-
Nico already showed how to get it. $repeaterPage = $page->get("name_of_repeaterfield")->first(); // gets first repeater $repeaterPageId = $repeaterPage->id; echo "<div id='$repeaterPageId' class='gallery'>"; Is same as: $repeaterPage = $page->name_of_repeaterfield->first(); // gets first repeater $repeaterPageId = $repeaterPage->id; echo "<div id='$repeaterPageId' class='gallery'>"; Or loop through repeater as if they're pages (they are) foreach($page->name_of_repeaterfield as $repeaterPage){ $repeaterPageId = $repeaterPage->id; echo "<div id='$repeaterPageId' class='gallery'>"; }2 points
-
2 points
-
OK, it's been a while since I looked at this, and much of it was inspired or guided by Ryan. I had to boil it down a little to make it generic enough to make sense, so this exact code hasn't been tested, but it should get you started. Here's a proof of concept that works. Template for your calendar page <?php function pagesToJSON(PageArray $events) { $json = array(); foreach($events as $event) { $json[] = pageToArray($event); } return json_encode($json); } function pageToArray(Page $event) { $data = array( 'id' => $event->id, 'title' => $event->title, 'start' => date("Y-m-d H:i:s",$event->start_date), 'end' => date("Y-m-d H:i:s",$event->end_date), 'url' => "./$event->id", // event ID is the url segment ); return $data; } if($input->urlSegment1) { // event ID provided as a URL segment to this page $event = $pages->get("id=$input->urlSegment1"); include("./includes/head.inc"); echo $event->title; echo $event->body; include("./includes/footer.inc"); } else if($config->ajax && $input->get->start && $input->get->end) { // fullCalendar making an ajax request of events $start = (int) $input->get->start; $end = (int) $input->get->end; $events = $pages->get("/calendar/")->children("sort=start_date"); $events = pagesToJSON($events); echo $events; } else { //display the calendar $config->scripts->add('/site/templates/assets/js/fullcalendar.min.js'); $config->styles->add('/site/templates/assets/css/fullcalendar.css'); $config->styles->add('/site/templates/assets/css/calendar.css'); $config->scripts->add('/site/templates/assets/js/cal.js'); include("./includes/head.inc");?> <div id="calendar"></div> <? include("./includes/footer.inc"); } // end else ?> head.inc <!DOCTYPE HTML> <html> <head> <title><?=$page->title?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- CSS includes defined via $config->styles->add --> <?php foreach($config->styles as $url) echo "<link rel='stylesheet' type='text/css' href='$url' />";?> <!-- include jQuery --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js" type="text/javascript"></script> <script>!window.jQuery && document.write(unescape('%3Cscript src="/site/templates/assets/js/jquery-1.6.3.min.js"%3E%3C/script%3E'))</script> <!--js includes defined via $config->scripts->add --> <?php foreach($config->scripts as $url) echo "<script type='text/javascript' src='$url'></script>";?> </head> <body> footer.inc </body> </html>2 points
-
I found (after 2-3 Projects using PW) that it's a good technique to use templates in a way I think hasn't been thought of yet really by some. (Although the CMS we use at work for year, works this way.) I'm sure I'm maybe wrong and someone else is already doing something similar. But I wanted to share this for everybody, just to show alternative way of using the brillant system that PW is. Delegate Template approach I tend to do a setup like this: - I create a main.php with the main html markup, no includes. So the whole html structure is there. - I then create page templates in PW without a file associated. I just name them let's say: basic-page, blog-entry, news-entry... but there's no basic-page.php actually. - Then after creating the template I make it use the "main" as alternative under "Advanced" settings tab. So it's using the main.php as the template file. - This allows to use all templates having the same php master template "main.php" - Then I create a folder and call it something like "/site/templates/view/", in which I create the inc files for the different template types. So there would be a basic-page.inc, blog-entry.inc ... - Then in the main.php template file I use following code to delegate what .inc should be included depending on the name of the template the page requested has. Using the TemplateFile functions you can use the render method, and assign variables to give to the inc explicitly, or you could also use just regular php include() technic. <?php /* * template views depending on template name * using TemplateFile method of PW */ // delegate render view template file // all page templates use "main.php" as alternative template file if( $page->template ) { $t = new TemplateFile($config->paths->templates . "view/{$page->template}.inc"); //$t->set("arr1", $somevar); echo $t->render(); } <?php /* * template views depending on template name * using regular php include */ if( $page->template ) { include($config->paths->templates . "view/{$page->template}.inc"); } I chosen this approach mainly because I hate splitting up the "main" template with head.inc and foot.inc etc. although I was also using this quite a lot, I like the delegate approach better. Having only one main.php which contains the complete html structure makes it easier for me to see/control whats going on. Hope this will be useful to someone. Cheers1 point
-
Renobird built this lovely calendar here. Is there a way to do this just using a date field? Is it possible to extract just the month from a date for example and foreach it?1 point
-
Table of contents Introducing the App and author Needs First version in PHP/MySQL without any Framework Why Processwire? App Version 1.0 Introducing the App and author Hi, my name is Luis and i´m a German based Web and Frontend Developer. I started 2010 with my own Internetbusiness and noticed at the very beginning of my business that it takes to much time to handle my accounting, invoices and clients. The main problem was that I needed for almost every task his own software solution, so the usual workflow in creating an invoice was something like open the CRM Software because the invoice software was good in creating invoices but bad in managing and searching clients, copy and paste the client into invoicing, create the invoice and handle it over to the accounting software. Not good at all... So I decided to create my own solution to fit my needs in the office management. Needs Invoicemanagement and creation Clientmanagement, very basic CRM Accounting Multi-User Simple financial stats about the Keyfacts of my business possibility to export the data for my tax consultant PHP / MySQL to work with it on intranet After pointing out my personal needs and writing down my usual workflow I started to develop the first version. First version in PHP/MySQL without any Framework In winter 2011/2012 I completed the very first version of my OMS (office management suite). The whole project was written in good old fashioned PHP from scratch. I´ve used this version till November 2012. Why Processwire? In mid 2012 I discovered Processwire and had no idea in how many ways this tool would change my life as webworker. After playing around with PW and developing the first little sites I had a little talk with my tax consultant, she said that my financial reports are pretty good and help to save money. (less time, smaller invoice from her) Why not publish the tool? Well, at this point my app was solely written for my needs, without possibilities for an Multi-User environment or for use in an companies Intranet. I finally decided to port the app to PW because of it´s flexibility, scalability and built-in user-roles. I had to dig deeper into PW at this point to see if I really could. Late 2012 I started porting the app in PW and was surprised how insanely fast developing could be. The whole database structure was ported into PW Pages, no SQL query is done by the app itself. It was possible to recreate the core functionality in about 2 weeks, implementing the Login and Multi-User functionality took another week. WebApp Version 1.0 https://youtu.be/PIgUMLZEcIU The app is now available for purchase @ www.misterui.de * also Processwire with an own eCommerce Script1 point
-
IMPORTANT This is now well and truly out of date! I strongly suggest ignoring it. The Bootwire System This is a series of proof-of-concept profiles based on ProcessWire 2.3 (forthcoming) and the Twitter Bootstrap Framework They are currently using Bootstrap 2.3 and JQuery 1.9.1 Bootwire Starter Profile Version 0.5 This version if for those who just want to leap in and get their hands dirty, It includes almost no content at all, very few fields and templates and very little markup. The normal Bootstrap navigation is in place for reference. More details are in the readme. Download Here: http://stonywebsites.co.uk/Bootwire-Starter-Profile.zip Github: https://github.com/jsanglier/Bootwire-Starter-Profile ============================================================ All versions come with a Site Settings page which is a child of a Content Management page in the page directory. This is used for common elements such as site title. The Starter Version has almost nothing in it! Some additional tweaks have been added to TinyMCE and these profiles are pre-loaded with the Modules Manager, the Profile Exporter and the Page Delete module. Please use the Module Manager to ensure all modules are up to date. NEW: Now with some demo functionality in a functions.inc file. Bootwire Demo Profile Built on the starter profile, this version demonstrates some Twitter Bootstrap functionality in the context of a ProcessWire installation. The Demo can be viewed here: http://bootwiredemo.stonywebsites.co.uk/ Download here: http://stonywebsites.co.uk/Bootwire-Demo-Profile.zip Github: https://github.com/jsanglier/bootwire/ Bootwire Admin Theme I have created an admin theme using Bootstrap 2.2.2. It is functioning but should be treated as a work in progress. However, you may like it. It has its own thread here. http://processwire.com/talk/topic/2640-bootwire-admin-proof-of-concept-admin-theme/ ============================================================== Future Profiles Bootwire Blog Profile This is intended to be a basic blog system using the Bootstrap framework. I am planning to start from scratch with the blog, basically because I need the exercise. It will not be as clever as Ryan's system, but it will have the following features (er ... possibly): Category Tree Tag System In-Article gallery Media pages Alternate themes for posts Lots of global settings Manual related posts Automated related posts (okay, probably beyond me) er ,,,, some other great feature that I have not thought of yet.1 point
-
hi there! after playing a bit with pw, i decided to choose my own new website as a first project to test it. im realy happy with it and i will use it as my number 1 choice for my own clients in the future. the first time working with an cms i've got not the feeling that i need to "fight" against it. i was realy suprised how easy it is to use ajax with pw, which i did for my references page, i'm still looking for an easy to implement url/hashbang ajax-solution - this is something i will add in the future to the site. a little blog will follow:) http://chrisvaupel.de constructive critics are welcome PS: it's a small site, but i bought procache and formbuilder, becouse i was curious and wanted to give a little bit of money support - anyway, i just like to say that booth are working realy well1 point
-
I noticed that when I resize the image in TinyMCE in Chrome it wouldn't resize really. The dragged image is smaller and width and height set in image tag. But when saving and looking at source the image is still the original! I noticed this because of responsive image css with max-width: 100%; It wouldn't show scaled version but still same size. In FF it worked and I tracked it down to in Chrome the click event check for the nodeName wouldn't return IMG for the first mousedown event for some reason. The check for the nodeName on the selection of TinyMCE would not return "IMG" . After trying to find a solution deperately I found a really minor fix that solves the issue in Chrome while it still works in FF. The trick is to just get the event.target instead. And I hope in other browsers it still works too but I'm sure it will. But maybe with IE could test this out? I made a pull request on the responsible TinyMCE PW plugin file. https://github.com/ryancramerdesign/ProcessWire/pull/174 Changed file https://github.com/somatonic/ProcessWire/blob/7c4d160152aae3aeb33b68a852c45c35008b0b54/wire/modules/Inputfield/InputfieldTinyMCE/plugins/advimagescale/editor_plugin.js1 point
-
That is only because php looks unfamiliar to a designer who thinks that php is only for experienced coders. That was my cms thinking also for a long time. Until I saw how easy you can mix html and php tags in Processwire. After playing for a while with simple php tags in processwire your opinion will change. The thing with php (and any other programming language) is that you "have to get into it". Just start with the PW tutorials and first learn to use simple php tags like <?php echo $page->title; ?> Here is a good start http://processwire.com/api/templates/ Later on you can learn something more like a for each in php. Check this post also http://processwire.com/talk/topic/2994-learning-php/#entry294991 point
-
thank you diogo for your help! i have look at the most tutorials and posts but not find something very similar to what i look for, if i see it in action this will help me a lot.. thank you wishbone and i agree with you. processwire cms is the best i ever try, it works like all designer dreaming, i wiss i have time for this website i want to make to stay with processwire and try to learn it. but sure for next project!!! thank you!!1 point
-
1 point
-
1 point
-
Thanks Nico! It's still 2.0.5 on http://modules.processwire.com/modules/process-preview/1 point
-
I think it's good to initially develop things in an isolated environment so that there aren't too many factors to consider. Especially with something fairly complex, as this sounds. So that's why I was thinking building it front-end and getting it working is a good way to get started. And once you've got that, converting it to another environment (like an Inputfield) becomes simpler. Yes, a Fieldtype can give an Inputfield a copy of the $page being edited. But as for "live" changes, you'd have to use Javascript, just like anywhere else. Modules are easy -- just a matter of filling in the required components. It's the other stuff you are talking about that sounds more complex. But if you want to learn more about module development, have a look at the /site/modules/Helloworld.module file. This wiki page on module creation is also a good intro: http://wiki.processwire.com/index.php/Module_Creation1 point
-
There's also good old wget with the recursive option: wget -r http://domain.com1 point
-
Yep. Just add PHP inside Javascript on your page like so: <script> var varname = '<?php echo $phpvalue; ?>'; </script> If you put this in a template file, since you're declaring a global variable there it should be available to external .js files too. You might want to wrap the jQuery documentready bit around the JS though. Remember - PHP is server-side, so that line of PHP will be parsed into a real value before it hits the browser, therefore if your $phpvalue was hello (for the sake of arcument) then your source code when viewed in a browser would look exactly like this: <script> var varname = 'hello'; </script>1 point
-
Thanks Teppo! Just installed it on a live site (after some testing) and it seems to work really sweet.1 point
-
I just commited an update to 1.1.6 While editing the wiki documentation page it somehow was deleted after editing doh! So updated readme a little and copied that to the wiki. `list_field_class` option (new in 1.1.6) You can optionally define custom classes using a string that can contain tags for field names of pages. For example: 'list_field_class' => '{template} p{id}', will add ' basic-page p1001' to each 'list_tpl' class string.1 point
-
$pages->get($name_of_repeaterfield); What does $name_of_repeaterfield contain?1 point
-
I might add a list field class option string, so you can add fields you want to each <li> item. so you could add whatever classes and do: 'list_field_class' => '{template} p{id}', and it would add this to every page list_tpl. And if left empty (default) it won't output. I think then with this one can cover all aspects a basic navigation needs more or less.1 point
-
HI Apeisa Just a note, if I am using, for instance, "thumbnail1" in my template, and I remove it from the list of thumbnails on the field, rather than just not working, it actually throws a server error, The code in my template is: if($newspost->article_newsimage){ $out .="<a href='{$newspost->article_newsimage->url}' class=''>"; $out .="<img class='align_right' src='{$newspost->article_newsimage->getThumb(artthumbnail)}'>"; $out .="</a>"; } While messing around with your update, I accidentally removed "arthumbnail" - so the image exists but the thumbnail doesn't. Is it worth adding something to your script so the result is not quite so dramatic?1 point
-
Greetings, As Soma explained, you can turn off the need for the title field. However, I would want to make sure this is a good idea. If you ever need those pages for other purposes, you'll likely want the title. Also, the "title" can be anything (any field). It does not need to be an extra field, and the user does not even have to know that it's a "title." For example, I'm working on a site with separate pages for numerous retail stores. Stores each have a unique "store number," and I just made that the "title." The user does not know that when they enter the store number they are simultaneously creating a "title," but now I have that bit of information to use in my template code. Based on your description, it sounds like your users are already building invoices through field entries. Maybe just use the "invoice_number" field as the title? Thanks, Matthew1 point
-
Should be more like: $mainPage = $pages->get('1234'); // some id of the page containing the repeater field $repeaterPage = $mainPage->repeaterField->first(); // repeaterField is the name of your field echo "<div id='".$repeaterPage->id."'>"; or $mainPage = $pages->get('1234'); // some id of the page containing the repeater field $repeaterPages = $mainPage->repeaterField; // repeaterField is the name of your field foreach($repeaterPages as $repeaterPage) { echo "<div id='".$repeaterPage->id."'>"; }1 point
-
This week I will be doing a gallery tutorial with Flexslider. But to be honest, rather a lot of it is down to how you do your template. For the moment, have a look at two tutorials I have done and one profile The first is a basic get you going tutorial: http://wiki.processwire.com/index.php/Basic_Website_Tutorial The second has more relevance as it teaches how to do a news system - that is relevant because if you are doing lots of albums with possibly categories as well, then you would use a lot of these techniques to sort it out http://wiki.processwire.com/index.php/Simple_News_System Lastly is my Bootwire Demo Profile This is a Bootstrap profile with some Bootstrap elements demo'd - and that includes a very, very basic gallery: http://processwire.com/talk/topic/2411-bootwire-basic-twitter-bootstrap-profile/ Make sure you go for the Demo, not the starter, as the starter has nothing in it! Other than that I will work on a Gallery/album demo with categories and so on in the next few days, I hope. But it really is very straight forward.1 point
-
In the latest commit to the ProcessWire dev branch, the LanguageSupportPageNames module now supports setting the homepage name for any of the languages. It should work exactly like how you guys requested. For example, if you set the Spanish homepage name to be "es", then from that point forward, all URLs for Spanish are preceded by an "/es/". Likewise, if you access any path preceded by an "/es/" then the user's language is set to Spanish. If you access the homepage "/" then the default language is set. If you access the Spanish homepage at "/es/" then you get the Spanish version of the homepage. Lets say that you set your "default" language homepage name to be "en". In this case, all default language pages become preceded with "/en/", except for the homepage itself… I wanted to avoid having two URLs that render the same exact thing. Use of this homepage "name" is completely optional. You could choose to not use it for your default language, and then use it for other languages, or you could choose to not use it for any, or you could choose to use it for all. Basically, I think it'll accommodate just about anything you could want to do in that respect. Let me know if you guys get a chance to test it and if you run into any snags or other ideas.1 point
-
I think that "justify" CK module may be added to default module instalation. Text alignment is pretty basic feature. Using it right now like: Toolbar: Format, Bold, Italic, -, RemoveFormat JustifyLef , JustifyCenter, JustifyRight, JustifyBlock NumberedList, BulletedList, -, Blockquote PWLink, Unlink, Anchor PWImage, Table, HorizontalRule, SpecialChar PasteText, PasteFromWord Undo, Redo Scayt, -, Source Plugins: pwimage,pwlink,justify1 point
-
Ryan: It's already there. If you know the anchor you want to link to, highlight the text you want to link, click the Link button, and type in the anchor name preceded by a "#", like "#myanchor". For us, so obvious. But some editors asked me how to link to an anchor. ( They don't know they have to preceded the name with a "#" ) In MODX there was a pull down in the link popup to select the target, that worked great. (no questions asked)1 point
-
Thanks Georgson for the suggestion, will look into that! Thanks for chiming in Jeroen, btw, Jeroen ported this design from modx evo to PW, did a great job while at it, so Jeroen, thanks again! Thanks, glad to hear it is fast on your end as well, kudos to Ryan for the procache module that drives that!1 point
-
That's more convenient and seems to work even better, thanks. Just for the people who also use this kind of solution and want to strip all "index.html" from the urls: find . -name '*.html' -print0 | xargs -0 sed -i '' 's/index.html//g'1 point
-
I thought this might be the best place to post this: Apress.com: Save 50% on a eBooks during SXSW!: http://app.streamsend.com/s/1/hbs1/GJF8Ay2/7xgk91 point
-
A wish from my side would be to make it possible to link to anchors within the PWLink popup. Great work Ryan !1 point
-
With multi-language page names, the beginning "en" or "de" segment (as examples) aren't technically necessary, as the language can be determined from the page names alone. But I understand it may still be desirable, so I'll be looking for ways to handle that. But as for $page->rootParent, you'd probably want $page->parents()->eq(2) instead. Also Page::rootParent is hookable. Though I don't really want people to have to think about these things. This could be done by adding checkbox or page reference fields to check which languages you want to be included in any given children() or find() results, etc., and then making use of it in your selectors. If that became desirable as a core feature, we'd probably implement it in some way similar, behind the scenes. I will probably have to set it up to override the user's language settings when the page names module is installed.1 point
-
And does it work? I don't know really what is if it doesn't work. Maybe something like this? http://stackoverflow.com/questions/5444249/unable-to-find-the-wrapper-https-did-you-forget-to-enable-it-when-you-config1 point
-
Just pushed version 1.0.0 (yay!) to GitHub. No huge improvements involved this time either, just some minor additions, comments, overall consistency checks etc.. and of course support for fantastic new CKEditor inputfield Ryan is working on One notable thing is that now tables created during install actually have proper (?) indexes included. If you've installed this module earlier and want to add these without uninstalling this module first, it's quite simple to do via MySQL client (I'm not familiar enough with PHPMyAdmin to say for sure, but this is probably easy to do there too): CREATE INDEX fields_id ON version_control_for_text_fields (fields_id); CREATE INDEX version_control_for_text_fields_id ON version_control_for_text_fields__data (version_control_for_text_fields_id); Don't worry too much if this seems difficult; these won't make any difference before you've got at least ~50k rows of history data (and even then the difference is minimal.) They should make things a bit faster especially if your site is very large, constantly updated and/or you want to keep history data "forever."1 point
-
Thanks guys, you are too kind. That calendar was done with Textpattern, but I built a proof-of-concept of essentially the same thing using Processwire. Ryan gave me some huge clues on using JSON. I'll post it when I'm back at the office next week.1 point
-
That is prettiest and probably most easy to use/browse calendar in long time. Reno is my designer hero for sure!1 point
-
Version 0.9.2 of this module (just pushed to GitHub) introduces support for multi-language fields. See commit details for more info. I've also brought in some minor fixes etc. during this weekend, so if you've installed this module you should consider updating.1 point
-
17, can you imagine? All the friends going to parties while Nico stays at home coding1 point
-
Hello Everyone, I have been testing extensively the past couple of days. My goal is to design and develop in ProcessWire, and then hook into a system to handle the shopping cart, (PCI-compliant) payment processing, and shipping steps. I've narrowed it down to these three: Shopify BigCommerce FoxyCart Shopify and BigCommerce are so close in capabilities, I review them together. FoxyCart is a whole different approach. Below is my assessment of everything except pricing, which to me feels rather even across all three systems... Shopify and BigCommerce Shopify and BigCommerce take you fully into their system, which means we must do all design and structure inside Shopify or BigCommerce. They each do have decent design and structure capabilities to customize the look of your "store," but as I tested them I kept wishing I could just use my $page, $pages, $field, $config, and other variables from ProcessWire to make my pages be what I want them to be. For payment gateways, Shopify lists 70 and BigCommerc lists 60. I did not have the time to test all the gateways, so I have to trust their Web statements on this! Shopify and BigCommerce also host your site and take all your files and data onto their servers. The advantage of this is that they can provide more statistical options, and can be used to control inventory. Shopify and BigCommerce are "Level 1" PCI compliance. To try out the systems, Shopify has a 30-day trial period, and BigCommerce has a 15-day trial period. At the end of the trial period, you have to decide if you are ready to go live (or, I presume, stop using the test). Useful information on these systems: Shopify Features BigCommerce Features FoxyCart This one really stands out for me right now: JS-linked forms and buttons that can be integrated into any PHP and hook out to Foxycart's system Can use ProcessWire variables as dynamic values inside the FoxyCart forms or buttons Allows full customization of checkout forms and process by linking to external style sheets With this system, you can develop everyting in ProcessWire and hook out to FoxyCart when it's time to run transactions. All of the great API elements of ProcessWire can be brought together in your store, but use FoxyCart to handle the messy parts of the e-commerce picture. FoxyCart lists 57 payment gateways. Since FoxyCart is only hosting the purchase phase of your transactions. It does not have the capability to keep inventory or other stock-type data. FoxyCart is "Level 2" PCI compliance. Not sure how significantly this compares to the "Level 1" compliance of the other two systems. FoxyCart has an unlimited trial period. That means you can test until you want your site to go live. Useful information on FoxyCart: Documentation Features Opinion In my testing, if you want something that can use your ProcessWire knowledge, FoxyCart is best. Has anyone else here built a working system with FoxyCart? Do you know of other systems that work this way? Thanks, Matthew1 point
-
I just like to add work code, if some one have a problem to make it work, after install the Module. This code is for parent page when the city map or address will show all children inside map, echo "\n\n<div id='map1'></div>"; //div to show in template map $js = "<script type='text/javascript'>"; $js .= "RCDMap.options.zoom = 2;"; $js .= "RCDMap.init('map1', 0, 0);"; foreach($page->children as $items) { $js .= "\nRCDMap.addMarker('{$items->title}', '{$items->url}', {$items->map->lat}, {$items->map->lng});"; } $js .= "RCDMap.fitToMarkers();"; $js .= "</script>"; echo $js; Here is code for a single page for city, hotels, or what ever u want to use it, echo "<div id='map'></div>"; //div to show in template map $js = "<script type='text/javascript'>"; $js .= "RCDMap.options.zoom = 10;"; $js .= "RCDMap.init('map', {$page->map->lat}, {$page->map->lng});"; $js .= "RCDMap.addMarker('{$page->title}', '', {$page->map->lat}, {$page->map->lng});"; $js .= "</script>"; echo $js; CSS #map { width: 100%; height: 300px; margin: 1em 0; } #map1 { width: 100%; height: 500px; margin: 1em 0; } JS <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://www.di.net/almanac/site/templates/scripts/RCDMap.js"></script> /*this is from Ryan you can put it in your folder*/ Thanks to RYAN,1 point
-
1 point
-
The page fieldtype refers to the page object itself, and not the id. So this should work: $news = $pages->find("template=news-post, news_section=$page, limit=5");1 point