Jump to content

Roych

Members
  • Content Count

    229
  • Joined

  • Last visited

Community Reputation

41 Excellent

About Roych

Recent Profile Visitors

2,128 profile views
  1. yes, it is working perfectly now! πŸ˜‰ I actualy already tried that but I guess i did something wrong because I couldn't make it work. Thank you very much πŸ˜‰ R
  2. Hello, Not sure if my title is appropriate for this post but I don't know how to explain in short what I need. πŸ˜‰ So I want to create a table of all posts and show what page reference field value is asigned to each post. Visualy I need something like this: # | EDIT | PUBLISHED | POST TITLE | first PageReference SPORT | second PageReference COOKING | third PageReference HEALTH | ... | ... 1 | edit | yes | my post 1 | yes | yes | / | ... | ... 2 | edit | yes | my post 2 | / | yes | yes | ... | ... 3 | edit | no | my post 3 | yes | yes | yes | ... | ... I hope you get the idea. So I have tried to create this but somehow not working as expected. My code below: Atm I'm showing values instead of Yes & No, just to see if it works. <table class="table table-bordered table-hover"> <thead> <tr> <th scope="col">#</th> <th scope="col">edit</th> <th scope="col">published</th> <th scope="col">Article title</th> <?php foreach($pages->get(1067)->children() as $child) { echo "<th scope='col'><a href='{$child->url}'>{$child->title}</a></th>"; } ?> </tr> </thead> <tbody> <?php foreach ( $pages->find('template=blog-detail, sort=-created, include=all') as $single ):?> <tr> <th scope="row"></th> <?php if($user->isLoggedin()){ if($single->editable()) { // if editable by user. echo "<td><a class='editpage-inline' href='https://" . $config->urls->httpHost . $config->urls->admin . "page/edit/?id=". $single->id ."&modal=1'> <i class='fa fa-pencil' aria-hidden='true'></i> Uredi!</a></td> "; }};?> <?php if($single->is(Page::statusUnpublished)): ?> <td style="color:red;font-weight:800;">Ne</td><?php else:?><td>Da</td> <?php endif; ?> <td><a href="<?= $single->url ?>" target="_blank"><?=$single->title;?></a></td> <?php if($single->zasvojenosti_select) :?> <?php foreach($single->zasvojenosti_select as $item):?> <td><?=$item->title?></td> <?php endforeach; ?> <?php else:?> <td>no</td> <?php endif;?> </tr> <?php endforeach; ?> </tbody> </table> It is working somehow but it is all messed up. The columns are not showing up as they should, there should be an empty column if the value is not set for the article. This is what I get I just hope you understand what I mean πŸ˜‰ Thank you very much in advance R
  3. Hello Maybe this was already asked, but could't find anything on the forum. Is it possible to merge two menus together somehow. I have a header menu with logo in between and now Im using two separate menuesbuilders for this. I also need to have another one for mobile. So everytime I update one menu I have to update mobile separately. Any chance I could combine two menues together so I wouldn't have to update the mobile everytime? So it would show both left and right in the mobile automaticaly. my code: (mobile menu) <?php $menu = $modules->get('MarkupMenuBuilder'); $options = array( 'wrapper_list_type' => 'ul',// ul, ol, nav, div, etc. 'list_type' => 'li',// li, a, span, etc. 'menu_css_id' => '',// a CSS ID for the menu 'menu_css_class' => 'dl-menu',// a CSS Class for the menu 'submenu_css_class' => 'dl-submenu',// CSS Class for sub-menus 'has_children_class' => 'menu-item',// CSS Class for any menu item that has children 'first_class'=>'',// CSS Class for the first item in 'last_class' => '', 'current_class' => 'active', 'default_title' => 0,// 0=show saved titles;1=show actual/current titles 'include_children' => 4,// show 'natural' MB non-native descendant items as part of navigation 'm_max_level' => 1,// how deep to fetch 'include_children' 'current_class_level' => 3,// how high up the ancestral tree to apply 'current_class' 'default_class' => '',// a CSS class to apply to all menu items ); echo $menu->render(2146, $options); ?> ID Left of the logo Right of the logo I tried something like this: echo $menu->render(2018|2019, $options); but ofc. not working. I hope I'm making sense here Thank you R
  4. Roych

    SeoMaestro

    Hello, Im trying to get body field from my repeater matrix to od description in SEOMaestro bu somehow can't get it to work. Right now I get title and other fields first then the body field. How can I achieve this in default settings. Thank you R
  5. Was just looking at it. Thank you for explaining πŸ˜‰ R
  6. I guess it still is πŸ˜‰ When I disable tracy the CO is gone. πŸ˜‰ Thank you R
  7. Hello, I have this little green CO in my favicon. I was just wondering, what does that mean, was googeling but couldn't find anything. Can someone tell me what is this for? Thank you R
  8. Will try to remember this one, thank you very much I'ts working great now πŸ˜‰ R
  9. Hello this was probably asked a million times, but somehow couldn't find anything. I need some help with translating some text inside of echo, I have expl. elseif ($today >= $start AND $today <= $end) echo " <span class='editor-label' style='margin: -7px 0 0 -7px;background-color:#db152e;'><span style='font-size: 10px;'><?= html_entity_decode(__('UNTIL')); ?> $end</span></span> "; I tried all sorts of things but it is not showing on the fronted. Thank you R
  10. Thank you very much I already had everything just not in the right place. All I had to do was to place <?php $events = $pages->find('template=calendar-post, limit=5, Start_date|End_date>=today, sort=Start_date'); ?> <?php if(count($events)): ?> above everything. Figured it out thanks to your example πŸ˜‰ Thank you R
  11. Hello I'm not a coder so would appreciate some help with PHP. I created simple even calendar and all is working great so far. I'm using next to fetch my events. Every event is a page. <h2>My Header for events</h2> <?php $events = $pages->find('template=calendar-post, limit=5, Start_date|End_date>=today, sort=Start_date'); ?> <?php if(count($events)): ?> <?php foreach($events as $single): ?> my events code! <?php endforeach; ?> <?php else: ?> <div>There are no events at the moment!</div> <?php endif; ?> But I would like to change this and hide the entire section including the <h2> if there are no events, how can I do that. Meaning that I would then remove (There are no events .... from the code). Not sure how to check if page (template=calendar-post, Start_date|End_date>=today, sort=Start_date') exists. Hope you uderstand Thank you R
  12. Oh, too bad πŸ˜• I Hope they'll fix it soon πŸ˜‰ Thank you R
  13. IT is not just one image it happens with diferent images, so the images are not the problem. Yes I'm using AutoSmush and SSL, did you happen to find the problem or fix for this? I'd like to keep AutoSmush if possible. Thank you R
  14. Hello, I'm having some weird issue with image uploads, with normal images field. I get Invalid image when I try to upload an image (normaly or drag&drop). It does not happen all the time if I try to upload the same image again sometimes it uploads but there is no thumb preview in admin. (but the saved image works on frontend). I noticed this on multiple of my sites, not sure what is wrong it was working fine not while ago. I'm I missing some update (maybe server) or ...? I have 3.0.165 and all modules upgraded. Any ideas? R
  15. Omg, not even sure what to say, lol? Didn't thought of them. Works perfect now πŸ˜‰ Thank you R
Γ—
Γ—
  • Create New...