• Content count

  • Joined

  • Last visited

Community Reputation

128 Excellent

About louisstephens

  • Rank
    Sr. Member

Profile Information

  • Gender
  • Location
    Greenville, SC

Recent Profile Visitors

2,203 profile views
  1. louisstephens

    I believe you would still have to foreach through the options like: foreach($page->name_of_select as $option) { echo "<li>$option->title</li>"; }
  2. louisstephens

    Thanks Robin! I will definitely thumbs up the issue. Also, thank you for the work around, it works like a charm.
  3. I came across something today which has me a bit puzzled. I have a site structure like: Development - Dev Heading - Dev Parent - Dev Child - Dev Child - Dev Parent - Dev Child - Dev Child - Dev Heading - Dev Parent - Dev Child - Dev Child - Dev Parent - Dev Child - Dev Child If I copy/duplicate a page that has children (like Dev Heading or Dev Parent), I am taken to a screen to change the name/url as well as the url "slug". However, If I try to clone "Dev Child", it simply clones it as "Dev Child 1" and sets the status to unpublished. It is okay, but kind of annoying when the two have separate actions. Is there a setting to change the current behaviour, as I rather like being taken to a screen to directly edit/publish the page. This would be beneficial to me as I have a hook on after page save for certain templates, but currently it saves it everytime I try to copy "Dev Child", and then I have to go in and edit/publish the page.
  4. louisstephens

    Basically, a lot of what wbmnfktr says. If the project is a bit more complex, I do schedule a time to sit down and go over the backend to see if they are having any hang-ups, or if they have tried to "force" the system to work in a way it was not developed for. Sadly, this seems to be an ongoing issue, and I spend a lot more time trying to clean up areas of the page tree where they have just dumped pages and claim the system is broken due to their lack of understanding/forgetfulnes. If everything has gone smoothly and any scheduled change(s) are complete, I do send out an email with a url to a survey to gather a bit of information on how the project went and how the processes could have been better tweaked.
  5. louisstephens

    Are you trying to hide the contents on the front-end or the back-end? Without being able to actually look at the site in question or the code, I can not really help. I would check your inspector and see what properties are being applied to the content. This will help you out in case you need to add !important (I hate using them) due to the framework.
  6. louisstephens

    Ah, thanks robin. The dump in Tracy really helps. I need to use that much more in my set ups for testing. Ill have to play around with the foreach loop, as I tried an if statement (Trying to group sectiona together and section b together),. But hopefully Ill get that worked out.
  7. louisstephens

    It works great! I appreciate the help. One thing I noticed (I am sure it is working as expected), I tried wrapping the foreach in a few divs, but the output is a bit strange like so: <?php $people = $pages->find("template=service-a|service-b, sort=parent.name"); $name = ""; foreach ($people as $person) { $out = "<div class=\"user\">"; if($person->parent->name !== $name) { $out .= "<h3>{$person->parent->title}</h3>"; $name = $person->parent->name; } $out .= "<ul>"; $out .= " <li>{$person->title}</li> </ul> </div>"; echo $out; } ?> expected: <div class="user"> <h3>John Doe</h3> <ul> <li>Service 1</li> <li>Service 2</li> <li>Service 3</li> <li>Service 4</li> <li>Service 5</li> <li>Service 6</li> </ul> </div> <div class="user"> <h3>Jane Doe</h3> <ul> <li>Service 1</li> <li>Service 2</li> <li>Service 3</li> <li>Service 4</li> <li>Service 5</li> <li>Service 6</li> </ul> </div> what actually is occurring: <div class="user"> <h3>John Doe</h3> <ul> <li>Service 1</li> </ul> </div> <div class="user"> <ul> <li>Service 2</li> </ul> </div> Did I just miss a tag?
  8. louisstephens

    Thanks robin! I will definitely try this out when I am not on mobile. Unfortunately, the system was set up in a bit of a haste and grew beyond what it was originally intended for. I should have had the foresight and set it up differently. I really appreciate all the help and thank you for always commenting on helpful suggestions/fixes. Hopefully I can get this all working together without a complete overhaul, but it might be needed at this point.
  9. So I am making a front-end dashboard for an internal project, and was curious if it is possible to match 2 pages together based on their title and retrieve the data. To make it more clear: I have two pages "Section A" and "Section B" that each has child pages with names (the specific person) with subpages for their services offered. Section A - John Doe (name=john-doe) - Service 1 - Service 2 - Service 3 - Jane Doe (name=jane-doe) - Service 1 - Service 2 - Service 3 Section B - John Doe (name=john-doe) - Service 4 - Service 5 - Service 6 - Jane Doe (name=jane-doe) - Service 4 - Service 5 - Service 6 What I would like to achieve on the front-end (if it is even possibile), is an output like: John Doe - Service 1 - Service 2 - Service 3 - Service 4 - Service 5 - Service 6 Jane Doe - Service 1 - Service 2 - Service 3 - Service 4 - Service 5 - Service 6 Thinking aloud: use a find to get all pages using the template "service user" and then foreaching through their children (and possibly getting a few field values as well) to output in the front end. The service templates used in the sections vary slightly in which fields they use. <?php $findUsers = $pages->find("template=service-a (and or) service-b,(some how match based on names)"); //if no match exists, output what is available ?> <ul> <?php foreach ($findUsers as $groupedUser): ?> <li><?php echo $groupedUser->title; ?></li> <li><?php echo $groupedUser->service_a_location; ?></li> <li><?php echo $groupedUser->service_a_body; ?></li> <li><?php echo $groupedUser->service_b_location; ?></li> <li><?php echo $groupedUser->service_b_phone; ?></li> <?php endforeach; ?> </ul> Sorry, it is just me thinking aloud, but I was not even sure if it is possible to group them together like that. I was going to have a page for each "section" only displaying that data, but I thought it would be nice to display them all together as an overview for the user.
  10. louisstephens

    Thanks everyone for the great advice! I am testing the waters right now using the module @adrian mentioned, and thus far everything is going great. My only real hurdle is getting the form submit portion. I am using wireMailSMPT , and I cant figure out really how to change out the $text = "" <?php $firstName = $sanitizer->text($input->post->form_first_name); $lastName = $sanitizer->text($input->post->form_last_name); //needs to be switched out if fullname is selected $email = $sanitizer->email($input->post->email); $phone = $sanitizer->text($input->post->phone); $textBody = " First Name: $firstName Last Name: $lastName //needs to be switched out if fullname is selected and not partials "; $numSent = wireMail($yourEmailaddress, '', $subject, $textBody, $options); ?> variable based on what is selected from the form {made even more complicated as the field select is inside a few matrix repeaters). I guess perhaps I have made it way to difficult as the field inputs are now dynamic, and now my form processing needs to be as well.
  11. louisstephens

    Thanks @Gary Austin, this seems very similar to what I was going to do. For your "notes" pages, did you simply create the fields in the backend and assign them to the pages? How did you go about rendering/processing the fields? A simple: $page->field_name ?
  12. louisstephens

    I guess my "issue" was having them in the setup tab and leaving their current page. I have tried to make the actions they can perform very straight forward/easy, as some of them are not very "tech savvy". I personally like what Form Builder (have not used it yet, but will be soon) offers, and it will be ideal for when another dev or myself use it. Unfortunately, having a long list of contact forms on a page for them all to see might create some confusion and result in editing the "wrong" form not applicable to them.
  13. louisstephens

    Thanks for the reply dragan. Currently, my strategy was to use a select options box, ie: 1=basic-form|Basic Form 2=enhance-form|Form Form etc etc And in my template, use a foreach: <?php if($page->form_select->title === "Basic Form") { echo "{form that I have predefined"; } else if($page->form_select->title === "Enhanced Form") { echo "{form that I have predefined"; } else if(...) {} else {} ?> The current set up works without issue and is pretty straight forward. However, it means I have to spend my time creating new forms due to a user wanting their own custom form and not sticking to a default . Understandably, my basic forms might not be a catch all for their needs. Now, the forms wont get too crazy, but some might need first + last names combined, whereas some need them split (for various reporting needs). I guess I am trying to devise a way to give everyone what they want with a blanket solution, without me having to create 40+ form variants and cause my if statements to be crazy. Aside from the structuring, each form might have to be sent to different email address with different subjects, but I have that under control with a few fields on their pages which directs wiremailsmpt correctly. Just thinking aloud, but maybe the closest to what I want is by using a page selector, and have the "pages" just be placeholders for the form elements, Ie First Name Email Address And in my template --> <?php $field = $modules->get("InputfieldText"); $field->attr('id+name','firstname'); $field->attr('type','text'); $field->attr('placeholder', 'First Name'); $out = $field->render(); echo $out; ?> However, this too will probably end up close enough to my first example/
  14. So I have been creating an internal web app over the last couple months, and am finally on the last piece of the puzzle, customizable forms. I thought I could just create a view basic forms and use a select option to let them select the form, and my template file could just output the form based on their selection. Easy enough. However, I have since ran into a slight head scratcher. Not all the forms are the same and they might vary greatly between each other. Has anyone done something similar to this? In an ideal world, I would use form builder, but I really dont want them to have access to it. They are currently constrained to a few pages in the backend, which is why I was trying to think of a way for them to select a few fields (like from a page select), and then render the selections on the front end based on what was selected.
  15. louisstephens

    Yeah, I remember making logos for a tags using: <h1><a href="/">COmpany Name</a></h1> a.logo { width: 350px; height: 75px; text-indent: -9999px; background: url(logo.png) no-repeat left top; } I never used many backgrounds with spans however.