Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

pers0n's Achievements

Jr. Member

Jr. Member (3/6)



  1. I'm not able to get my array list. I have a menu template and I'm grabbing it, but it won't let me go inside it I get this error Warning: Invalid argument supplied for foreach() in /x/site/templates/includes/header.inc on line 61 $items = $pages->find('template=menu, title=Toolbar Menu, include=all'); //THIS SHOULD WORK foreach ($items->menu_item as $item) { $output .= '<li><a href="' . $item->link . '"'; if ($item->open_in_new_window) $output .= ' target="_blank"'; $output .= '>' . $item->title . '</a></li>'; } I'm attaching a screenshot of a selector test
  2. If I have a field for URL, say a page needs to link to another page. If the user is viewing the site in Spanish and that link points to the English version, does it know to output the spanish version of the link? And if so redirect the user to the spanish URL? Is the language the visitor views the site in, kept in sessions or something for it to do this? I'd rather not have 2 URL fields
  3. I'm building a multi-language site and wanted to know the best way to deal with images. Because on a multi-language site, they may want a different image for a different language, especially if the image has text in it. What is the best way to deal with this? Should I make another image field for spanish and if they don't put anything there, just use the english image and if there is a spanish image, then use that image for spanish?
  4. I'm guessing this isn't possible. I've seen where you can set it up so that you can pull the PW standard admin and then override ALL the CSS files, but I just want to append 1 CSS and 1 JS file at the end of the standard admin.
  5. I already installed PW, but I want to switch to one of the other themes that were given as an option during install? I'm sure there is an easy way to do this? I searched, but didn't find it. I checked config.php, but didn't see it listed. The only reason I want to change it now, is because I have 2 PW installs, one I'm using the blog setup as a reference for setting up somethings on another site and I want to make sure I keep the admins looking different. Thanks
  6. Putting the append lines before the default.php, doesn't make them load either I'm getting things rendered as the default admin theme does them, but its not putting my custom.css or custom.js files anywhere in the source
  7. <?php include("/wire/templates-admin/default.php"); $config->styles->append("/site/templates-admin/styles/custom.css"); $config->scripts->append("/site/templates-admin/scripts/custom.js"); I want to make a theme that just adds on to what is already the default admin theme, but for it to add a CSS and JS file to the head, so I can just have my custom stuff work. Is this not possible? So far it isnt working and the files exist.
  8. Great to know a module like this exists Another alternative is to modify the .htaccess file and do a temporary redirect 302 to say a html file at the root called /maintenence.html and then when the site is out of it, edit the .htaccess file to no longer redirect everything to that page and then do a permanent redirect 301 back to the regular homepage / for anyone going to maintenence.html. The visitors won't know any difference Now you might ask, how the admins would login, well if you know your IP address you can allow just that IP to not be redirected Another alternative, is to only redirect everything but whats in your /admin/ directory (whatever you have it named, hopefully something else), granted noone would be able to preview the site
  9. I've looked over the code, but have no clue where to even define the field to use TextareaLanguage
  10. How would I make a module use "TextareaLanguage" rather than just a regular text field? I'm modifying the Events fieldtype and want some fields to be language friendly.
  11. I have a field called "number of columns" its an integer (the max is 5, just a note in the description) If it is set to >0 then it shows a repeater (this is working) The repeater then has 5 textfields, and each one needs to only show up if the number of columns requires it so for example, if somone puts in "2" then the repeater shows up (this works as I mentioned) and the repeater should only show 2 of the textfields (this is the part that isnt working). I've went in and set col1_text to be visible if num_of_columns>0 col2_text to be visible if num_of_columns>1 however, processwire isn't saving that setting and so it ignores it. I'm on PW 2.4.0 and I'm trying to build some kind of dynamic table creator (it will be limited to 5 columns max) with a decent UI, so people can easily track the columns, having the columns in tabs or making it to where someone could accidently make 3 colums in one row and 4 in the other isn't good and so this is the solution I've come up with, but its not working for some reason
  12. This module would be awesome if it wasn't tied to only events, it might be reworked to build dynamic table data. I have a case where i need to make several dynamic tables of information and I need column titles that get defined once, with each row of columns below with repeatable data and the UI for this "events" fieldtype looks like a starting point. Otherwise I have to mismash a solution where a user might not put in the right amount of rows or columns, because they can't see everything at once You know how tables work: column-title1, column-title2, column-title3 (this row is set once) row1col1-data, row1col2-data, row1col3-data (these rows repeat) row2col1-data, row2col2-data, row2col3-data row3col1-data, row3col2-data, row3col3-data ... Now being able to build that dynamically and dynamically set the # of columns and rows, would be very powerful.
  • Create New...