Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


MarcC last won the day on February 16 2012

MarcC had the most liked content!

About MarcC

  • Birthday May 12

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MarcC's Achievements

Sr. Member

Sr. Member (5/6)




Community Answers

  1. Just as an update to this topic, I tried out the jQuery load change and unfortunately it didn't work. However, some of the other ideas I had led to results in working with back-end code, and the test page is working OK now. I still need to run some more tests but thought I'd update the thread while I remember it.
  2. Ah, so it seems like it may be almost like a race condition with jQuery loading. That's interesting. I'll add that suggestion to my next batch of things to try here, thanks for your input. ? I've given some thought to this kind of thing, and other changes I'd like to make, and I have to say we've come a long way with recent changes already, but I know what you mean there.
  3. Hi all, I have some Hanna Code output for PHP Social Stream which is giving different results when the same code is output in two different fields. Here are the two examples for comparison (Removed as things are working now) You can see that the page at the second link appears without proper CSS styles, which seems related to the jQuery issue. (Please note that the social feed output itself is not yet fully configured, so the feed in the footer will let you scroll forever, etc.) The Hanna Code is the same for both, i.e. there is only one test in the Hanna Code PHP right now, to check if the full class for the vendor code has already been include-ed. Tests are run without caching, and both fields have the same CKEditor filtering, other options, and the same general output logic. Tracy Debugger is active and there are no PHP errors in the logs. But only one of these fields is giving the correct result. I did test in other fields (Body for example), and everything works fine there as well. I thought I'd ask the community for input and would be grateful for any suggestions, thanks for your time.
  4. Oh funny, thanks. That's a pretty clever way to manage the configuration. So in case anyone else is wondering, it seems you can either add a namespace to your template files or just set $config->templateCompile to false in config.php. I do wonder what the implications are for either choice, or how future-proof it is to set this to false instead of adding the namespace.
  5. Hi all, Am I correct in remembering that adding a namespace statement to the top of every template file will prevent the file compilation process from needing to run during a 2.x to 3.x upgrade? I had attempted this same upgrade previously on a site with many pages, but the upgrade seemed to fail. However, afterwards I realized it may have been the delay in compiling files rather than a failure of the upgrade. So I'd like to avoid the compilation process if possible. Thank you for any tips! --Marc
  6. Hi everyone, I'm having an issue where a selector doesn't seem to be working properly with page->closest. Here is the code: // Look for the closest page with any social URLs filled in $page_with_socials = $page->closest("extra_url_1|url_5|extra_url_2|extra_url_3|extra_url_4!=''"); if ( $page_with_socials->id ) { // We found a page with social fields containing some URL content $social_config = $page_with_socials; } else { // Fallback: Use home page social URLs // This is used every time extra_url_1 is empty, even if the other URL fields are filled out $social_config = $homepage; } Instead of checking the various fields, the selector is treated like it only says this: $page_with_socials = $page->closest("extra_url_1!=''"); In other words, it's like the other fields aren't even checked for content. If url_5 is filled in, or not, it doesn't matter. The else-fallback is always used as long as the other field, extra_url_1, is empty. So I'm wondering--do I need to change the way I'm using the pipes in my selector or something? Thanks for any tips.
  7. diogo, these are great ideas. Thank you. I really like the pipe-separated version and it would seem to fit great, so I'll give that a go. Thanks again.
  8. Hi everyone, I set up a simple Hanna Code button snippet for a project, like this: [[special_button url='example.com' label='Visit Example.com']] The client is using it actively and have asked for a side-by-side version, where two buttons will be next to one another. In this case, they are requesting this because the URL varies depending on where the website user lives--County A or County B. Any thoughts about how to implement this? Which HTML structure would you prefer for the columns, keeping in mind this is user-editable content? Would you alter the Hanna Code at all? I'm not used to using Hanna Code and layout options together, in a textarea like the Body field, so I thought I'd ask. Thanks!
  9. Was there a field or Profield that could help site editors design pages? I thought I saw something like this a few years ago: Editors can choose from specified types of page layout elements while editing the page (For example--gallery, 1-column text, 3-column text, news items, etc.) Rearrange these elements Duplicate the elements Is there something like this? Thanks in advance.
  10. Terrific. Thanks Robin, both of those seem like excellent options.
  11. I have a bunch of events in the back end of a site which are sorted by date, and wondered if it's also possible to sort them by title within the date selection, for example using a "sort=date,sort=title" selector. In this way, an event called "A Day for Children" would show up before "Zero Hour" if they're on the same day. I tried to make this change in the parent template's Family tab, under "Sort settings for children," however I don't see a way to use multiple sorting criteria. Is this possible somehow? The site is currently running 2.8.62. Thanks!
  12. Hi everybody, I am updating a PW site that has been migrated away from another vendor. The old URLs had a prefix-segment like /page/ in front of blog posts. Here is the rule I created in PW's .htaccess: RewriteRule ^page/blog/(.*)$ blog/$1 [R=301,QSA] Within the .htaccess, this is placed before another, working, rule, and below the directives to enable mod_rewrite. Can anyone see a reason why this would not be doing anything? If I go to example.com/page/blog/blah I still get a 404 page instead of being redirected to example.com/blog/blah. Thanks!
  13. Hi Sergio, yes, it is on the same server. Do you know of any code examples for doing this? I've used the API for mostly basic things, so if there's a skeleton example available that'd be helpful. I'm excited to hear it's possible.
  14. I am in the process of upgrading an older PW website, say www.example.com. At new.example.com I have an upgraded version, but now the client needs to make content changes on the old site, like 15-20 pages added per day. How can I most easily move these pages over from the old site to new.example.com, when other people are already making new pages at new.example.com? Thanks!
  • Create New...