-
Posts
361 -
Joined
-
Last visited
Everything posted by mel47
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
mel47 replied to David Karich's topic in Modules/Plugins
Hi I tried to add AIOM to my website but I can't figure why I have this error message : Class 'ProcessWire\AIOM' not found <script src="<?php echo AIOM::JS(array('scripts/jquery.unveil.js', 'scripts/jquery-popup.js')); ?>"></script> What I did wrong? Thanks Mel PW3.0.75 AIOM 3.2.3 -
Solved. Found why. Url segments was activated on home template. Thanks!
-
Thanks for clarification. To be honest, I already tried MarkupSitemapXML before this module. I was unable to see sitemap in any of them, so I guess it's my config who failed.
-
Hi Thanks for this module. I was googling tonight to find an how-to for building sitemap and see this. But I have 2 stupid questions: "Home" template is not available, is it because it's included by default? Where is the sitemap? domain.com/sitemap.xml brings me to my home page. Did I did something wrong? Thanks Mel
-
Ok thanks! Have played too much with markup and classes options (incorrectly). Everything is fine now. Mel
-
Solved my problem by just copying the wrong path in head : <link rel='stylesheet' type='text/css' href='https://unpkg.com/leaflet@1.0.3/dist/leaflet.css' /> <link rel='stylesheet' type='text/css' href='/developpement/site/modules/MarkupLeafletMap/assets/leaflet-markercluster/MarkerCluster.css' /> <link rel='stylesheet' type='text/css' href='/developpement/site/modules/MarkupLeafletMap/assets/leaflet-markercluster/MarkerCluster.Default.css' /> <!-- Scripts supporting the use of Leaflet.js --> <script type='text/javascript' src='https://unpkg.com/leaflet@1.0.3/dist/leaflet.js'></script> <script type='text/javascript' src='/developpement/site/modules/MarkupLeafletMap/assets/leaflet-markercluster/leaflet.markercluster.js'></script> <script type='text/javascript' src='/developpement/site/modules/MarkupLeafletMap/assets/leaflet-providers/leaflet-providers.js'></script> <script type='text/javascript' src='/developpement/site/modules/MarkupLeafletMap/MarkupLeafletMap.js'></script> <!-- Extend Leaflet with Awesome.Markers --> <link rel='stylesheet' type='text/css' href='/developpement/site/modules/MarkupLeafletMap/assets/leaflet-awesome-markers/leaflet.awesome-markers.css' /> <script type='text/javascript' src='/developpemente/site/modules/MarkupLeafletMap/assets/leaflet-awesome-markers/leaflet.awesome-markers.min.js'></script> However, I have a question. Is it possible to display popup by default (without having to click on the marker)? Thanks! Melanie
-
Hi, I feel very stupid. I read all the thread and all the documentation. But I'm unable to hide scf-website by css. How I can add class='hidden' to this specific field? $scf = $modules->get('SimpleContactForm'); $options = array( 'btnClass' => 'button is-primary', 'successMessage' => 'Message Sent!', 'errorMessage' => 'Sorry - error, your message was not sent!', 'markup' => array( 'list' => "<div class='field' {attrs}>{out}</div>", 'item_label' => "<label class='label' for='{for}'>{out}</label>", 'item' => "<div class='control'>{out}</div>", 'item_error' => "<article class='message is-warning'><div class='message-body'>{out}</div></article>", ), ); echo $scf->render($options); Thanks Melanie
-
Hi, I also the same problem, a white space on front-end. My code is In head <?php $map = wire('modules')->get('MarkupLeafletMap'); ?> <?php echo $map->getLeafletMapHeaderLines(); ?> On my page : $map = $modules->get('MarkupLeafletMap'); $content.= $map->render($page->children, 'map2'); which gives <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <!-- Scripts supporting the use of Leaflet.js --> <script type="text/javascript" src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script> <script type="text/javascript" src="/developpement/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-markercluster/leaflet.markercluster.js"></script> <script type="text/javascript" src="/developpement/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-providers/leaflet-providers.js"></script> <script type="text/javascript" src="/developpement/site/modules/FieldtypeLeafletMapMarker/MarkupLeafletMap.js"></script> <!-- Extend Leaflet with Awesome.Markers --> <link rel="stylesheet" type="text/css" href="/developpement/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-awesome-markers/leaflet.awesome-markers.css" /> <script type="text/javascript" src="/developpement/site/modules/FieldtypeLeafletMapMarker/assets/leaflet-awesome-markers/leaflet.awesome-markers.min.js"></script> However, it looks like it doesn't find any page (404). I even put 777 on /MarkupLeafletMap module. What else can I try? Thanks Melanie
-
Thanks @Ivan Gretsky, effectively adding a new field in the template do the job. Final result: // main template $content .= $thanks_page->render('images', '/images_column'); // images_column.php foreach($value as $image) { echo " <article class='column is-{$page->sizeColumn}'> .... }
-
Hi I'm not sure I understand correctly the rendering of a field, more specifically passing $options. I want to use some variables to avoid creating many templates, but I'm not sure how. It should be something like this, but it doesn't work: ---in my page $sizeColumn = "2"; $content .= $thanks_page->render('images', '/images_column', $sizeColumn); ---In images_column.php $sizeColumn =''; foreach($value as $image) { echo " <article class='column is-{$sizeColumn}'> .... } What I'm doing wrong? Thanks Mélanie
-
Hi I'm trying to display a map with a marker on frontend with this : $map = $modules->get('MarkupGoogleMap'); $content.= $map->render($page->children, 'map'); The map appear, correctly zoomed at the good location. However there is no marker. The marker appear correctly in backend. Do I miss something? Thanks Mélanie PW 3.0.69 - MapMarker 2.0.9
-
Hi, I'm stuck on this issue for too much time now... I want to display a "new" badge beside the most recent pages. I don't have problem with the queries but I don't know how to display them: $news_member = $pages->find("template=news, body*=$page->title, publish_from>=$year, sort=-publish_from, limit=10"); $recentNews = $news_member->find("publish_from>=$lastMonth"); if ($news_member->count()) { foreach ($recentNews as $n1) { $content .= "<span class='tag is-success'>New</span><p><a href='{$n1->url}'>{$n1->title}</a></p>"; } foreach ($news_member as $n2) { $content .= "<p><a href='{$n2->url}'>{$n2->title}</a></p>"; } But, obviously, the list is repeated a second time by the second loop. How I can "substract" the recentNews from news_member? Or I'm on the wrong track? Thanks Mélanie
-
Hi What's wrong? if ($page->directors) { $content .= "<p>Direction:</p>"; foreach($page->directors as $d) { $content .= "<p>{$d->title}<p>"; } } Directors is a AsmSelect field, which could have a value or be empty. However, even when empty, it always print "Direction:" How come I could avoid it? Thanks
-
Oh wow, it works! :-D Did I already said pw have the best community? ;-) For posterity, it put the final version of my news template (without markup) based on @Sérgio with some modifications. I add start=0 on recent news, so they will not paginate. The list of 10 is then updated at each loading by the button. Maybe (probably) not best optimize, but it works! @szabesz yes, ajax works fine. I use intercooler to facilitate my lacking knowledge. if($config->ajax) { //Ajax output $recent_items = 3; $limit = 10; $news = $pages->find("template=news, parent=1027, limit=$recent_items, sort=-publish_from, start=0"); //3 most recent news $news2 = $pages->find("template=news, parent=1027, limit=$limit, id!=$news, sort=-publish_from"); //Next 10 foreach($news2 as $new) { //markup } $children = $page->children("limit=" . $limit); $totalpages = ceil($children->getTotal() / $limit); if ($input->pageNum) { if ($input->pageNum < $totalpages) { $content .="<li ic-append-from='" . $page->url . $config->pageNumUrlPrefix . ($input->pageNum + 1) . "' ic-trigger-on='scrolled-into-view' ic-target='.liste' ic-indicator='#indicator'>Next"; } } // Main output $recent_items = 3; $limit = 10; $news = $pages->find("template=news, parent=1027, limit=$recent_items, sort=-publish_from, start=0"); //3 most recent news $content .= "<div id='featured' class='liste'>; foreach($news as $post) { //Markup for featured news } $news2 = $pages->find("template=news, parent=1027, limit=$limit, id!=$news, sort=-publish_from"); //list of 10 $content .= "<div id='listing'><ul class='style2'>"; foreach($news2 as $post) { //Markup for listed news } $totalpages = ceil($news->getTotal() / $limit); if ($input->pageNum) { if ($input->pageNum < $totalpages) { $content .= "<li><button class='btn btn-default' ic-get-from='" . $page->url . $config->pageNumUrlPrefix . ($input->pageNum + 1) . "' ic-target='closest li' ic-replace-target='true'>Load More... <i class='fa fa-spinner fa-spin ic-indicator' style='display:none'></i> </button></li>"; } Thanks! Mélanie
-
Hi, Could someone could help me? I'm searching a way to output 2 different markups from 2 different selectors and use pagination. Basically, I want the first 3 news as featured and the next ones as a list. Pagination will be a "load more" button to replace the list by next results. My first try was : $news = $pages->find("template=news, parent=1027, limit=3, sort=-publish_from"); //3 most recent news foreach($news as $post) { ///markup } $news2 = $pages->find("template=news, parent=1027, limit=10, sort=-publish_from, start=3"); //List of next 10 foreach($news as $post) { ///markup } It works fine, however pagination is messed up (it display only for $news, because of start parameter in $news2) My second try. I was thinking use a kind of loop to display differently. however I'm little bit lost. I found this on web : $i=0; $news = $pages->find("template=news, parent=1027, limit=10 sort=-publish_from"); foreach($news as $post) if ($i < 3) { ///markup $i++; } However I'm not sure how to display the next 10, and I'm not sure for pagination. Some other ways I'm not aware? Thanks Mélanie
-
See screenshots. In the meantime, I discover that saving the pages solve the problem. However since it's massive import, I will end up to save every pages manually. Can I suggest an addition, maybe, to Admin Actions?
-
Hello, Just a quick question. I want to use this module in conjunction with BCE for creating multilanguage pages. Everything works during import except that name is not the good one; so I was searching for alternative to get localized name's page. I succeeded to rename pages as I wanted. However the urls are not modified. I have a green message "PagePath installed, you're protected". I guess I have to de-install this module to get it working. But does it will create other problems? Can I do it only once I finish all my imports and re-install the module after? Does the change will have been permanent? Thanks Mel I'm using PW 3.0.61
-
Thanks @Robin S it's really what I wanted!
-
Sorry, I should have remove this selector, since it's not the point. Author is a PageReference field found on publication template. The field alias is a PageReference field from the template member. I want to be able to select publications for an author either by its name ($page->title) or from their alias (author could have 2 or 3 differents surnames; $page->alias). I know how to use a foreach to get a single page, but how to apply in case of a selector? $publis = $pages->find("template=publication, author.title=??") Digging around while writing this explanation, I found this $publis = $pages->find("template=publication, author.id={$page->alias}) //works ->33 pages $publis = $pages->find("template=publication, author.title={$page->title}) //works ->82 pages //but how come this doesn't work ->0page $publis = $pages->find("template=publication, author.id={$page->alias}, author.title={$page->title}) How I can combine both results in one selector?
-
Hi, I'm searching, without success, to use all values of the pageArray inside a selector : foreach($page->alias as $al) { $publis = $pages->find("template=publication, categ_publi=$c, author.title={$page->title}|{$al->title}") } it doesn't work, but I have no idea how to get it. Thanks
-
@justb3a Thanks!
-
Hello, Thanks for your module; I read all the thread. Last year, it seems impossible to have some html in extra fields, does it works now? Anyway, if so, I'm unable, it always strip out my <a href[...] Furthermore, I'm seems unable to add more than 1 textformatter, I can just choose one (and I'm not really sure it was applied). Thanks Mel PW 3.0.51
-
I used the module BCE. It's a "work-around", but it's do-able (if you don't want too much languages). You import 1st language. Switch your admin to the other language and re-import with second language.
-
Yeah, I think it is the problem. I don't want to use it as a paragraph. I considering changing to a different field.
-
Hi, I'm not sure to know how I should structure my template. I have two pages : publication.php and member.php. I want to display publications of the specific member on his page. What is the difference between using a function or render the template? For now I have (publication.php): function renderPubli ($page) { $out = ''; foreach($page->author as $a) { // PHP Warning: Invalid argument supplied for foreach() in .../sites/dev-wire/site/templates/publication.php:8 $members = wire('pages')->find("template=member, name|alias.title={$a->name}, include=hidden"); // membres qui ont comme titre $tous = []; foreach($members as $m) { $tous[$m->title] = $m; } if($members->count()){ //si une page author existe foreach($tous as $m) { $out .= "<a href='{$m->url}'> {$a->title}</a>, "; } } $out .= " <span> ({$page->year}). {$page->titre}</span> <em>{$page->journal} </em>"; ....... return $out; } and member.php foreach($publis as $p) { $out .= "<li>" . renderPubli($p) . "</li>"; } It is working, but do I should care about this PHP warning on member's page coming from publication's page? Do I could do something better? Does with render() I will have a better outcome (for now, no success)? Thanks