Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/2015 in all areas

  1. I'd like to thank LostKobrakai for this excellent tutorial included in the Dec 25, 2015 blog post regarding custom page types. If you haven't read it yet, please do so. It is contributions like this by the senior members that prove selecting ProcessWire was the correct decision for this ProcessWire-Newbie. I am impressed at what I have learned within the functionality of ProcessWire, and discovering avenues I hadn't yet thought about. It is indeed a merry Christmas. I also want to thank all staff members. They deserve our gratitude for the time they dedicate to helping us learn ProcessWire, and the many avenues available with each project. For example, kongondo contribution is another great example of the team in place here. My hat is off to Ryan and his team for giving of their time and sharing their knowledge. In addition to the regular staff, there are many members, such as Kixe, Tom, (and too many others to name them all here) that also deserve recognition for their contributions and assistance. It is greatly appreciated. I am certainly looking forward to ProcessWire 2016 ;-)
    11 points
  2. MERRY CHRISTMAS for all those who celebrate it! Here's to another awesome year with ProcessWire
    4 points
  3. Merry Christmas to you as well. That was one of the many CMSs I looked at before making my decision to go with ProcessWire. I'm old-school, so my requirements are far more basic than what others may think is best for development. For example, that matrix functionality, in my opinion, was one of the items that was more fluff than actual enhancement. Being old-school, I don't care for the "dreamweaver/frontpage"-esque approach to developer tools. As powerfully simple as ProcessWire is, anyone can develop whatever feature module they think may help take their ability to create to the next level. I prefer an unobstructed, hands-on approach to development, rather than adding bloat from installers, less, template engines, and any other proclaimed 'enhancement' for development. Split windows and a refresh work just fine for preview.
    4 points
  4. just a easy one...as a little christmas present. My clients sometimes have problems to find the view link... so here some example CSS for ProcessPageEdit.css in /templates/AdminCustomFiles/ #content .WireTabs #_ProcessPageEditView { color: #69b023; font-weight: bolder; } #content .WireTabs #_ProcessPageEditView:before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0); content: "\f06e\00a0 "; } #content .WireTabs #_ProcessPageEditView:hover { background: none; text-decoration: underline; border-color: transparent; } using BernhardB 's famous giphy tool it looks like: (just a example with fontawesome and bold to get the idea) regards mr-fan
    3 points
  5. I wish all a great end of 2015 and a even better 2016! Best regards mr-fan
    3 points
  6. Thanks to everyone who has invested in had joy with ProcessWire.
    3 points
  7. I double the thanks! I think LostKobraKai's posts around the forum are a damn awesome source of learning, short elegant code filled answers right in your face! But certainly can't stop thanking here, there is so much talented and experienced people giving away so much valuable advice, I had forgotten how important a community can be when learnimg new stuff. And no, I'm no that drunk yet! But already feeling sentimental lol
    3 points
  8. Yay! This was the year I started my Processwire affair, it has been great! Thanks everyone for the good vibes!
    3 points
  9. Thanks everybody for your replies. I already saw the wire render pattern passing by somewhere in the past in the forum but didn't realize then it was what I was looking for now. I prefer not to use a module at this moment and will try clsource's wire render pattern (well documented) and Horst's solution which I found again here in the forum https://processwire.com/talk/topic/8767-regarding-delayed-output/ also mentioned by mr-fan in this thread. I think these approaches will make the delayed output strategy for me a complete workflow for almost any website and speed up time to get things done and maintained.
    3 points
  10. Old has been referenced way too many times in this thread. I find it interesting to observe the development methodologies preferred by the different generations. It reminds me of this...
    2 points
  11. Hi Bernhard, Hi Horst, thank you for your responses! After some days of travelling I've now time to look at this again. I understand that these issues have to do with the fact that when bootstrapping PW there is no outputformatting. Thanks for the clarification! I followed Berhards 1. suggestion and it is working. I thought I have to put these ajax-files in the root but obvioulsy thats not the case. I can put them in the templates directory - if I also create a page for that. (That I missed earlier). Thank you both
    2 points
  12. @pwired: You should have a look to the SPEX module, it has all what you are looking for onboard allready.
    2 points
  13. There is a easy way to enhance the delayed output methode that don't get to abstract... my setting is based on a tipp from horst i think... in my templates folder i've simple a new folder named site/templates/layouts/ and there i have special layout if needed. in my _init.php: //default layout for output $myLayout = 'default'; in my _main.php: //output layout for main page content include("layouts/{$myLayout}.php"); while this code is placed where the whole complete content between header/menu and footer magic happens...all other stuff like columns or sidebars are maintained in the default layout for example: //default layout is two column layout with right sidebar for submenu or article pages echo $headerContent; //see _init.php - some heading stuff //wrapper section and some space echo '<section class="container page-content" >'; echo '<hr class="vertical-space2">'; //start page content echo '<section class="eleven columns">'; echo $content; echo '</section>'; //sidebar content echo ' <aside class="four columns offset-by-one sidebar">'; echo $aside; echo ' </aside>'; //end wrapper echo ' <hr class="vertical-space2">'; echo ' </section>'; or the full_page.php layout: //default layout is two column layout with right sidebar for submenu or article pages echo $headerContent; //see _init.php - some heading stuff //wrapper section and some space echo '<section class="container page-content" >'; echo '<hr class="vertical-space2">'; //start page content echo '<section class="sixteen columns">'; echo $content; echo '</section>'; //end wrapper echo ' <hr class="vertical-space2">'; echo ' </section>'; and in the _template_ files i setup the content vars used in the layouts and overwright the layout setting if needed. example basic-page.php where the user can set the aside sidebar on or off (optionfield full_page)... //basic-page.php = normal page content //render pagetable content - kind of blockbuilder for main content if(count($page->pt_content)>0){ foreach($page->pt_content as $l){ $content .= $l->render(); } } //page is with sidebar so we render Staff if it is set if ($page->flag_fullpage == 0){ // 1 is checked, 0 is unchecked $aside .= renderStaff(); } //set full_page layout if flag_fullpage is check on the default page template if ($page->flag_fullpage == 1){ // 1 is checked, 0 is unchecked $myLayout = 'full_page'; } so this is only one more layer to get different layouts for different or the same templates... this is just a easy example - but if you use url segements for articles (root-page/year/month or root-page/tag) you could switch the layout for these...and so on. i'm not the fan of making simple frontend layouts to abstract...so may this helps you forward. Best regards mr-fan
    2 points
  14. I use the wire render pattern, and conditional outputing things in certain areas are easy to achieve. Sure there are other ways, but with that pattern I´m happy so far https://processwire.com/talk/topic/11646-the-wire-render-pattern/
    2 points
  15. FYI I already wrote a PW article for code tutsplus. It's publication-ready and will be released mid-January. Can't wait what you guys will say about it!!
    2 points
  16. AvbMarkupHtml - HTML tag manager for ProcessWire This module allow you to use less HTML elements inside your PHP code ! Added hook for page. For make quick markup calls : $page->html(); Github : https://github.com/trk/AvbMarkupHtml Example usage and all methods : // All Configs $config = array( 'quote' => '"', 'indent_with' => ' ', 'tags_without_indentation' => 'link,img,meta', 'WirePage' => null, 'tag' => null, 'tagSelfClosed' => null, 'tagNoClose' => null, 'tagCustom' => null, 'tagStart' => '', 'tagEnd' => '', 'prepend' => '', 'prepends' => '', 'attributes' => array(), 'dataAttributes' => array(), 'label' => '', 'note' => '', 'text' => '', 'texts' => array(), 'hasTexts' => false, 'field' => '', 'field_value' => '', 'fields' => array(), 'hasFields' => false, 'child' => '', 'children' => '', 'append' => '', 'appends' => '' ); // All Methods $page->html(array('key', 'value')) // $config ->tag('string', $args=array())) // tag name, $args=content,tag-options => "/>" self closed, "->" no close, "=>" special tag ->setQuote('double or single quote') // default is : " ->addClass('string') // Element class name ->id('string') // Element id ->attr('key', 'value') // output : key='value' ->attributes(array('key', 'value')) // attributes ->data('key', 'value') // output : data-key='value' ->dataAttributes(array('key', 'value')) // data-attributes, this will add auto data- prefix to your attribute ->prepend('string') // a string value ->prepends(array('values')) // array for values ->text('string') // text for inner tag ->field('field_name', 'page_object') // Field name and page object ->texts(array()) // enter text array | array('Text 1', 'Text 2') ->fields(array(), 'page_object') // enter field names as array, a page | array('title', 'body') ->note('field_name', 'page') // enter a field name, a page ->label('field_name', 'page') // enter a field name, a page ->append('string') // a string value ->appends(array('values')) // array for values ->r(true|false) // Alis with ->render(); function ->render(true|false) // This will return result ->o(true|false) // Alias with ->output(); function ->output(true|false); // This will print result | default pretty print value is : false // #Example 1 : Working With ProcessWire $ul = html::ul()->addClass('list'); foreach($page->children as $p) { $ul->child( html::li() ->addClass('list-item') ->data('id', $p->id) ->child( html::a($p->title) ->addClass('list-item-link') ->attr('href', $p->url) ->data('id', $p->id)->r() )->r() ); } $ul->o(true); /* output : <ul class='list'> <li class='list-item' data-id='1057'> <a class='list-item-link' href='/en/villas/' data-id='1057'> Villas </a> </li> <li class='list-item' data-id='1001'> <a class='list-item-link' href='/en/location/' data-id='1001'> Location </a> </li> <li class='list-item' data-id='1090'> <a class='list-item-link' href='/en/guestbook/' data-id='1090'> Guestbook </a> </li> <li class='list-item' data-id='1055'> <a class='list-item-link' href='/en/contact/' data-id='1055'> Contact </a> </li> <li class='list-item' data-id='1005'> <a class='list-item-link' href='/en/site-map/' data-id='1005'> Site Map </a> </li> </ul> */ // #Example 2 html::div() ->addClass('container') ->addClass('container-center') ->attr('style', 'border: 1px solid #000;') ->data('id', $page->id) ->data('title', $page->title) ->child( html::h1($page->title) ->addClass('h1-title') ->r() ) ->child( html::div($page->body) ->addClass('container-inner') ->r() ) ->o($config->debug); /* Output <div class="container container-center" style="border: 1px solid #000;" data-id="Page id field data will come here" data-title="Page title field data will come here"> <h1 class="h1-title"> Page title field data will come here </h1> <div class="container-inner"> Page body field data will come here </div> </div> */ // #Example 3 : html::div("Hey !") ->addClass('container') ->addClass('container-center') ->id('centered-container') ->output(true); /* Output <div id='centered-container' class='container container-center'> Hey ! </div> */ // #Example 4 html::ul()->addClass('list')->children(array( html::li('Li element value 1')->addClass('list-item')->render(), html::li('Li element value 2')->addClass('list-item')->render(), html::li('Li element value 3')->addClass('list-item')->render(), html::li('Li element value 4')->addClass('list-item')->render(), html::li('Li element value 5')->addClass('list-item')->render() ))->output(true); /* Output <ul class='list'> <li class='list-item'> Li element value 1 </li> <li class='list-item'> Li element value 2 </li> <li class='list-item'> Li element value 3 </li> <li class='list-item'> Li element value 4 </li> <li class='list-item'> Li element value 5 </li> </ul> */ // #Example 5 $title = $page->html('title')->tag('h1')->addClass('h1-class')->render(); echo $title; // #Example 6 : This will directly print $page->html($page->title)->tag('h1')->addClass('h1-class')->output(); html::h1($page->title)->o(); // #Example 7 : Self Closed Tag $modules->AvbMarkupHtml->html()->tag('hr', array(null, '/>'))->output(); html::hr()->o(); // #Example 8 $page->html($page->title)->tag('h1')->addClass('my-h1-class')->output(); html::h1($page->title)->addClass('my-h1-class')->o(); // #Example 9 $page->html('title', $pages->get('/contact/'))->tag('h1')->addClass('my-h1-class')->output(); html::h1()->addClass('my-h1-class')->field('title', $pages->get('/contact/'))->o(); // #Example 10 $modules->AvbMarkupHtml->html()->tag('div')->addClass('container')->children(array( $page->html('title')->tag('h1')->addClass('my-title')->render(), $page->html('body')->tag('div')->addClass('my-body')->render() ))->output(); // #Example 11 | Multiple child, prepend, append $html = $page->html()->tag('div')->addClass('uk-container')->addClass('uk-container-center'); $html->prepend( $page->html()->tag('div')->text('Prepend #1 !')->render() ); $html->prepend( $page->html()->tag('div')->text('Prepend #2 !')->render() ); $html->child( $page->html()->tag('div')->text('Hey !')->render() ); $html->child( $page->html()->tag('div')->text('Foo !')->render() ); $html->child( $page->html()->tag('div')->text('Bar !')->render() ); $html->append( $page->html()->tag('div')->text('Append #1 !')->render() ); $html->append( $page->html()->tag('div')->text('Append #2 !')->render() ); $html->output(); // #Example 12 | Create A HTML page //-> Create Html Tag $html = $page->html()->tag('html')->attr('lang', 'en')->attr('dir', 'ltr'); //-> Create Head Tag $head = $page->html()->tag('head'); //-> Add TITLE inside HEAD tag $head->child( $page->html()->tag('title')->text('My Website')->render() ); //-> Put HEAD inside HTML Tag $html->child($head->render()); //-> Create BODY Tag $body = $page->html()->tag('body')->addClass($page->template); //-> Create DIV Tag $container = $page->html()->tag('div')->addClass('container'); $container->children(array( $page->html()->tag('h1')->addClass('h1-title')->text('H1 Title')->render(), $page->html()->tag('div')->addClass('body-content')->text('Body Content')->render() )); //-> Put DIV.container inside BODY Tag $body->child($container->render()); //-> Put BODY inside HTML Tag $html->child($body->render()); $html->output(true); // Pretty HTML output /* Output <html lang='en' dir='ltr'> <head> <title> My Website </title> </head> <body class='homepage'> <div class='container'> <h1 class='h1-title'> H1 Title </h1> <div class='body-content'> Body Content </div> </div> </body> </html> */ // #Example 13 Static Call Example $article = html::tag('article')->addClass('uk-article')->children(array( html::field('title')->tag('h1')->addClass('uk-article-title')->render(), html::tag('hr', array(null, '/>'))->addClass('uk-article-divider')->render(), html::field('body')->render() )); $article->output(true); /* Output <article class='uk-article'> <h1 class='uk-article-title'>Page Title</h1> <hr class='uk-article-divider' /> Body Content </article> */
    1 point
  17. I started an Flarum integration module. Predefined and also custom API calls are supported. "data" and "included" objects are converted in PW WireArray and supports PW API like find() and get(). http://flarum.org/docs/api/ http://jsonapi.org/examples/ At the moment unencrypted username and password is needed to get an token for logged in api calls.
    1 point
  18. Thanks! Merry Christmas to you and your family as well! Here's to a safe and prosperous new year for all!
    1 point
  19. The so called matrix fieldtype was already discussed multiple times in various places all over the forum. The closest thing we currently have in processwire is probably the page table extended module, which makes different page table items far more visually distinguishable than the raw table view it has by default. The crucial difference between craft and processwire is, that craft decided to let the matrix field hold other fields – fieldception so to speak – whereas in processwire fields can only be hold by templates and therefore used in pages (without any repetition). Even repeaters, which seem like the inflexible predecessor of something like the matrix field, are internally using hidden templates and pages to store their content – opposed to the idea of storing it on the page the repeater is on. For this reasons page tables are probably the best option in terms of content management, but the UI side of it is no were near something like the matrix field. @horst Here you go: https://craftcms.com/features/matrix
    1 point
  20. Hey guys, this upgrade now appears on PW 3.0 (devns) branch. If you are using the ~= operator in a search, like "title~=disability act" it now asks MySQL for the ft_min_word_len (per @LostKobrakai's suggestion above). If any word length falls under that threshold, it delegates that word to a separate REGEXP command in MySQL that matches whole words. This is actually an improvement over the code I mentioned earlier because the previous code that converts it to use a "%=" for short words could match things like "disability fact" or "react to this disability" etc. Whereas the new core addition will only match whole words in the same way that the MySQL index would, meaning the field would only match if it contained the exact words "disability" AND "act" somewhere in the field, and not some word that happens to contain the partial word "act". To take it further, it also now uses this technique to match stopwords that MySQL doesn't full-text index. Previously it would just exclude them from the search since the presence of a stop word would prevent a search from matching. Now you can perform searches that include those stop words and match them.
    1 point
  21. Yes, this was precisely my original intent. But once you explained that it was not possible due to the big impacts on the Core (and there is no front-end vs. back-end state as you point out) , then your hook suggestion was a good solution for my usage, and I'm happy with this. And I know that any addition to the API have to be done very cautiously, so that it remains focused and consistent. Now, having this findOne() API method seems actually excellent, because, even in terms of naming, it makes perfect sense of what it does, and it nicely complements the API. And yes I think it will really add clarity, especially for newcomers.
    1 point
  22. This is actually one area that I think may be too broad in scope for a tuts plus tutorial. That's because PW doesn't generate markup nor does it have an official front-end forms API, so it would be much more of an HTML and PHP tutorial than a ProcessWire one. Keep in mind the guides there are to demonstrate the simplest possible cases. We use concatenation because it's really simple and easy (and what I prefer), but that doesn't mean it's a requirement of delayed output. You could just as easily use arrays, output buffering, wireTemplateFile(), wireIncludeFile(), etc. The point is to demonstrate delaying your output until the appendTemplateFile inclusion. That's what delayed output is. ProcessWire's API is a PHP API, so I find it a lot simpler to stay in that API rather than constantly jumping in and out of HTML. After all, it requires <?php ?> tags to jump in and out of PHP from HTML, but does not require anything but quotes or heredocs to use HTML within PHP. PHP alternative syntax is handy for large blocks of conditional HTML. But for most markup generation situations I don't recommend it unless you personally find it more readable. For many of us, the additional verbosity and constant jumping in/out of PHP & HTML make it difficult to read and follow, but this is purely a preference thing as I don't think it matters to the end result at all. When it comes to writing tutorials and/or documentation, I try to communicate the concepts in the simplest/shortest way possible so that focus remains on the concept and API calls that we are trying to teach. That doesn't mean you have to do the same, or that doing it differently means you aren't adhering to the concept. Whether you are using alternative syntax or not matters little to the concept. Though since you are in "direct output" when outside of a php tag, it does make your job a little harder for delayed output. But you can amend that by isolating your markup and rendering it with wireTemplateFile(). Fantastic! @benbyf and @isellsoap just let me know if there's anything I can do to assist. Thank you for writing tutorials for PW!
    1 point
  23. er314 sorry I think I misunderstood, as I thought you were suggesting we change the behavior of the existing $pages->get() method, or make it have front-end vs. back-end state (which isn't really possible since PW's API has no front-end/back-end knowledge, and the context of the API is neither). But I'm glad you started this topic because, like I said, I think you've identified a reasonable addition to the API here that should help to further clarify the purpose of the methods for any that may have confusion. And if you and Teppo had confusion about it, then certainly others will too. We've had a $pages->findOne() method in our API since the beginning, but it's just been there as an alias to $pages->get() and just for backwards compatibility. I have dropped the purpose of that method in PW3, since we no longer need that backwards compatibility, and I very much doubt anyone uses it other than the core in a few spots (which I've updated to use the get method instead). I have changed $pages->findOne() to be an alternative to $pages->get() in PW3, that by default filters in the same way as $pages->find(). You'll see this in today's commits. I think this adds more clarity because one can now assume that any $pages method that starts with "find" is also "filtered" by default.
    1 point
  24. My menus work like this First create a "menu" template, a simple empty template that will hold "menu-item" pages as children. Then create the "menu-item" template that can hold 'menu-item' pages as children, fill it with these fields : - (title field) The title for the menu - (item field) A page reference (Single Page or NullPage) field that will link any page in the site except pages with menu or menu-item template. - (isExternalLink field) A checkbox that tells if the link is outside the site. - (externalLink field) a Textbox that holds the external url if the checkbox isExternalLink is active. You can add many additional fields depending on your needs, like css, js, or other information. When that is done just create a page named "Menu" with the "menu" template, later add children pages with the "menu-item" template. Now you have a menu that can be rendered like any other page in processwire. $menu = $pages->get('/menu'); foreach($menu->children as $menu_item) { if($menu_item->isExternalLink){ echo "{$menu_item->externalLink}"; } else { echo "{$menu_item->item->url}"; } } With this approach you can rely on the Processwire backend to give order to the items and create as many children and deep levels as you like
    1 point
  25. The translation has been updated to 2.7. Just pushed to GitHub.
    1 point
  26. er314, I think your intentions are in the right place and I appreciate your determination. You are still asking for an established method with a specific purpose to have a different purpose and an access controlled front-end context, when that is not the purpose or full context of the method. So I hope you can understand why it's not realistic to just change the definition and implementation of an established method. But I get where you are coming from and think you've identified a potential helpful addition in the API, so I go ahead and add a "one" method or change the "findOne" method (in PW3) to behave as a "find just one" method with regard to access control, hidden/unpublished visibility settings, etc. While I don't personally think I will ever use this method, I think that you and Teppo have identified a couple of situations where some might find it handy. Even if one doesn't need it, perhaps just the presence of it in the API will further clarify the intentions of the methods as a whole, for folks that may have thought that the existing find() and get() were the same. I still worry a little bit about people forming an impression that PW's API is doing access control for them, when our entire API is based around providing methods for the developer to control access the way they see fit. The viewable() method is the basis of that. But we've already dipped into that territory with the find() method, and by adding the proposed method, we're not removing any control, just adding more options. So I think it's an okay. What I was stating is that I'm not aware of an instance where anyone has introduced security problems into their site as a result of using the get() method. Though you stated above that you did just that, so now I'm aware of an instance. You are correct that if a developer uses a $pages->get() method to retrieve a page that came from user input, and neglects to validate that the page is one you allow, then that could be a problem. But the same problem could surface anytime a developer neglects to properly sanitize or validate something–anything–that originated from user input. And this is not something you can skip regardless of what method you are using to retrieve a page or group of pages. Simply validating that a page is viewable does not mean it's valid for whatever operation you may be performing upon it. You would need to validate that it uses the expected template, comes from the expected parent, etc. So while we are adding a PW3 method to support your request, be careful not to get the impression that you no longer need to validate a page that originated from user input. Also keep in mind that a $pages->find() or proposed $pages->findOne() method that filters results is based on database-filtering, not runtime filtering. Part of PW's access control model supports runtime hooks to Page::viewable. If your situation includes any runtime access control options and pages you are loading as a result of user input, you shouldn't skip a $page->viewable() call regardless of what method you used to retrieve the page.
    1 point
  27. @ryan How about using this http://stackoverflow.com/questions/5716362/how-can-i-get-the-value-of-mysqls-ft-min-word-len-configuration-variable-usin to retrieve the value on install and maybe a setting somewhere, where it can be readjusted ($config maybe)? It's hard to imagine this value to change often.
    1 point
  28. Hi Henrik, I'm not sure and in a hurry, but regarding 1), it can have to do with outputformating state. Please try and compare both possibilities explicitly set: $nlPage = $wire->pages->get("/newsletter/"); $newText_with_outputformatting = $nlPage->of(true)->text_without_p_tags; $newText_without_outputformatting = $nlPage->of(false)->text_without_p_tags; My guess is, that without setting it to true, in bootstraped mode it is set to false, = unformatted. This way no textformatter is supplied. Whereas the Template-Scope is the only scope where outputformatting is set to true automatically. Everywhere else, you have to explicitly check or set it. Regarding 2: you can define what you want to have as result, array or singleimage i the settings (advanced settings?) of the image field. But this also is only supplied if the outputformatting is ON. If you are in bootstrap mode, and access to it, you get unformatted return, what always is an array for all fields that can handle multiple items. Please refer to the docs for multiples and outputformatting to get more information. Once you have read it, you will get how it works, and that it all makes sense.
    1 point
  29. Hi henrik, this problem comes from the fact, that there is no outputformatting when bootstrapping PW. therefore image fields are always arrays even if they are set to max = 1 and all your textformatters won't work. https://processwire.com/talk/topic/5375-image-paths-when-bootstrapping-pw/ regarding your ajax problem: you don't need to create a file outside your site folder! you have two options: 1) create a separate template only for ajax requests and also a page for that (eg hidden page /ajax) - then you can just call this page and return your content 2) return your ajax content from within the same file. if you are using delayed output strategy that's really easy. all you have to do is put something like this on top of your template file: if($config->ajax) { // do your ajax stuff here echo 'i am an ajax response'; die(); } // regular call $headline = '<h1>' . $page->title . '</h1>'; $content = $page->body; and so on... hope that helps! good luck
    1 point
  30. here's a quick way to change the slider increment for your date timepicker, (this would go in AdminCustomFiles/ProcessPageEdit.js): if(typeof $.timepicker != 'undefined') { $(function(){ $.timepicker.custom = { stepMinute: 15, }; $.timepicker.setDefaults($.timepicker.custom); }); } if you run the latest version of timepicker addon (1.6.1) you can use selects instead of sliders: (for example if you are on current dev/stable, you copy the inputfield to site/modules and tell the system to use that one; then upgrade to the latest timepicker, and copy the new css to the datetime css; if are on devns, word is that it will include the latest version of timepicker). if(typeof $.timepicker != 'undefined') { $(function(){ $.timepicker.custom = { stepMinute: 15, controlType: 'select', oneLine: true, }; $.timepicker.setDefaults($.timepicker.custom); }); }
    1 point
  31. I struggled with this too in the past. A while ago, I switched to use The IntlDateFormatter class like, for example: $fmt = datefmt_create( 'de-DE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Berlin', IntlDateFormatter::GREGORIAN, 'MMMM Y' ); // format doesn't use PHP style, but ISO-Format! see: http://framework.zend.com/manual/1.12/en/zend.date.constants.html#zend.date.constants.selfdefinedformats $datum = is_numeric($page->getUnformatted('datum')) ? datefmt_format($fmt, $page->getUnformatted('datum')) : ''; And welcome to the forums, @Klenkes. (?)
    1 point
  32. @mrkahn - I've yet to see a way to represent nested pages in a multi-page select; it would be interesting if it were possible, but i think it would take some custom module. I guess you could create dummy pages that trigger a new dropdown and then the first item after that is the dropdown parent and then the subsequent items are the children of the first item; then you would need another dummy page to end the subnav; i think that would work, but it seems like a lot of work; I build menus using pages, so this makes it easy to build menus, publish and unpublish menu items, and have as many levels as needed with no extra work. It also allows you to have a custom title for every menu item, set an icon if you want, or classes, or use javascript as the menu item... here's an example site with 3 menus:
    1 point
  33. 1 point
  34. hmmm - maybe you should add an export function to the Pro Cache module ...
    1 point
  35. When the cache is fully populated, you could do this. You could literally take everything in the /site/assets/ProCache/ dir, move it to the root on another web server and it would function statically. You would also need to have your other static assets copied over too, which I think would be limited to these dirs: /site/assets/files/* /site/assets/templates/styles/* /site/assets/templates/scripts/*
    1 point
×
×
  • Create New...