-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
@horst, if you have a chance, please look at the above? Sorry for pinging you like this.... ?
-
No Your 'Our Sessions' page needs to have children for this (and the other similar) code to work: The children will be titled Huddersfield Eagles Junior Badminton Club, etc. In addition, those children: Need to use a template named session. That template (session) needs to have the following fields: session_type, session_day, session_venue, session_time and session_area
-
That's the one. It seems the sessions page does not have any children or some of their settings were changed: Is the sessions pages titled Sessions or Our Sessions? Does it have children? Does the site have a field named session_venue? What type of field is it? PageReference, Text, other? Does the site have fields named session_type, session_day, session_time and session_area? What type of fields are they? Does the site have a template called session?
-
Hi @pmichaelis, I'll have look. Thanks for reporting.
-
OK, this code just shows where the scripts are called but not the PHP that fetches the accordion items. Not really. It's fine in footer.inc in order to load JavaScript last (it's a page load optimisation thing). I bet this is where the PHP (ProcessWire) code to fetch the accordion items from the database items is (unless someone deleted it :-)). Please show us the code in sessions.inc. Mostly likely there will be a $pages->find() or a $pages->get('/some/path')->children();. The items probably use a template called session(s). PS: Always wrap your code in the code blocks <>.
-
[SOLVED] i cannot output anything from repeat field
kongondo replied to picarica's topic in Getting Started
Ahem...you mean @adrian ? -
I doubt you'll find this :-). In ProcessWire, JavaScript stuff is handled on the client side. This wouldn't be saved with the page (database). There are two things on that page. The tabs and the accordion. Both are definitely built using JavaScript. The usual way to do this is to output items in your template file (e.g. items from a $pages->find() and in a html block, identify them using an ID or a class. E.g. <div id="something">. There would be JavaScript code in the template file or included via some script that will look for "#something" and build the final markup (i.e., the accordion, etc). Looking at the HTML source code of your sessions page (F12), it seems the tabs are built using bootstrap. The accordions are probably built using jQuery. This is the code from the source code on the sessions page: <script> $(document).ready(function() { $('.accordion .accordion-section-title').removeClass('active'); $('.accordion .accordion-section-content').slideUp(300).removeClass('open'); function close_accordion_section() { $('.accordion .accordion-section-title').removeClass('active'); $('.accordion .accordion-section-content').slideUp(300).removeClass('open'); } $('.accordion-section-title').click(function(e) { // Grab current anchor value var currentAttrValue = $(this).attr('href'); if($(e.target).is('.active')) { close_accordion_section(); }else { close_accordion_section(); // Add active class to section title $(this).addClass('active'); // Open up the hidden content panel $('.accordion ' + currentAttrValue).slideDown(300).addClass('open'); } e.preventDefault(); }); }); </script> Looking at the HTML source code still, it seems your accordions are empty. That's why they are not opening. Edit: So, if you can find out the template file or possibly a .inc file that has the above script, we can help you with how to output the accordion content.
-
Page selector referencing template of pages in a page field
kongondo replied to snck's topic in API & Templates
Same setup here :-). -
There's these events to hook into: https://getuikit.com/docs/sortable#events. Most likely you want the moved event. Here's some code stolen from the wild and a pen from the said wild: UIkit.util.on('#sortable', 'moved', function (item) { // do stuff }); And a specific example on sort order: https://stackoverflow.com/questions/47549648/uikit-how-to-get-order-with-the-sortable-component
-
Page selector referencing template of pages in a page field
kongondo replied to snck's topic in API & Templates
Works fine for me. ProcessWire 3.0.153 dev -
@Mamun Paul, Welcome to the forums and ProcessWire. Please don't double post. You asked the same question here and @adrian provided a response. Thanks.
-
I have no idea. It's a JavaScript accordion and I have no idea which one the developer used or what is supposed to go in there. Maybe if you could show us the code on the relevant template file....
-
How to split test and measure clicks - SOLVED
kongondo replied to OllieMackJames's topic in Dev Talk
Just a note that this link has moved here: https://getkirby.com/docs/cookbook/extensions/ab-testing -
Hi @Michael Pope, Welcome to the forums.. Maybe these topic can get you started?
-
That's sort of a loaded question but given the writing on the wall, I would go with Flutter. There's articles out there comparing the two if you want to get into specifics.
-
The main menu (I suppose what you are referring to as opened from the header) is pointing to the page /our-sessions/. On the contrary, your Read More' button is pointing to /sessions/. You should check in the template file (or maybe an .inc file if that is what was used to generate the Read More buttons) and change it there. It's hard to tell without seeing the code. The simplest way to find is to to search your /site/templates/* for this: <div class="service-wrapper"> That's the wrapper for those service buttons (Read More).
-
Bingo! From the looks of it, this was the setup: There was a field of type Checkbox with the name footerlink. This was assigned to a template (or even templates). When editing a page with that template, if you wanted that page to appear in the footer menu/nav as a link, you had to tick the checkbox. ProcessWire stores a ticked checkbox as 1 in the database. The code in footer.inc would look for all pages that had their checkboxes ticked (this is the $pages->find("footerlink=1"). It would then output them in the footer menu/nav. Since you have no footerlink field, ProcessWire throws the error. For non-superusers, we are not shown the real error, so we get a generic 500 error. Quick remedy Create a field of type Checkbox and name it footerlink. Add it to the template(s) whose pages you'd like to appear in the footer menu/nav (@note: editors should be instructed not to tick too many pages' checkboxes, otherwise it could break the design, but this is up to you. You might even want (as the developer) to take control of this). Change the code in footer.inc as below: <div class="row"> <div class="col-md-12"> <ul class="nav navbar-nav footer-nav"> <?php // nav based on checkbox field $footerNavItems = $pages->find('footerlink=1'); if($footerNavItems->count) { foreach($footerNavItems as $item) { echo "<li><a href='$item->url'>$item->title</a></li> "; } } if($user->isLoggedin()) { // if user is logged in, show a logout link echo "<li><a href='{$config->urls->admin}login/logout/'>Logout ($user->name)</a></li>"; } else { // if user not logged in, show a login link echo "<li><a href='{$config->urls->admin}'>Admin Login</a></li>"; } ?> </ul> <div class="footer-copyright">© 2020 ViveSport</div> </div> </div> Some things to Note Some people don't like exposing the link to the admin of their ProcessWire sites in cases where they have changed the name of the admin login from the default one (ie. processwire). If that's the case, remove the logged in user code. I know you were debugging and it has helped us, but live sites should not have their config->debug set to true. An easier way would have been to debug whilst logged in as superuser. A better way is to install the module TracyDebugger. Hope this helps.
-
Aha! That looks like it! As the error says, you are missing a field called footerlink. From your original install, are you able to tell what type of field it was? You can also search your template files for code like $page->footerlink or $something->footerlink. That will at least tell us where it is being called from.
-
I believe what was meant was piece of cake for ProcessWire, i.e. ProcessWire can handle it ? (in. reference to your "Hope do not regret this"). Welcome to the forums and ProcessWire ?
-
It should be the code generating OR around this: <ul class="nav navbar-nav footer-nav">
-
No worries! We can help you with the 'internal server error' bit if you could tells us or show us the script that was used to generate the footer menu. It is most likely being called from one of your /site/templates/something.php
-
I just saw it and I like it :-). TBH, what I find 'ugly' is the favicon badge :-). The first thing I do when I install Tracy is to disable it :-). Don't mind me though...
-
Cool! How you finding it?
-
Not necessarily. You have at least two other options. If it's not a lot of work and you really need this to be sorted, you can grant someone here from the forums (not just anyone!) temporary superuser access either to the remote site or send them the original DB dump of the site before you started working on it. If you have very sensitive data in the dump/site, then this becomes a bit tricky. If you have a budget, pay someone from the forums (post in the Job's board) to sort this out for you.
-
Here's some discussions/showcases on Progressive Web Apps. The first one is particularly helpful. An alternative you could consider, if you have the time and want to pick up a new skill is to create your android app using Flutter ?