Search the Community
Showing results for tags 'conditional'.
-
I was trying to fix an error earlier which was preventing a series of if statements from working. Basically I have a button called "Product Drawing" which needs localising depending on the current language session. Eventually got it working - I had a bracket in the wrong place....
- 15 replies
-
I have the following import script being included in the homepage template file: <?php $mmpid = wire('pages')->get('template.name=makes')->id; // Manufacturers: $file = __DIR__.'/manufacturers.csv'; importCSV($file, 'mamo_manufacturer', $mmpid); // Models: $file = __DIR__.'/models.csv'; impor...
-
I think this could be a bug. I'm using an Options field to create an array of radio fields. This field is required. Each option activates a conditional field and this works perfectly. I added a required if condition to this conditional fields, on a template level, and this is displayed correctly wit...
-
I'm trying a twist on a simple if / else statement. If the blog_category field is populated (page select), display the categories. If not, don't output anything. This works: <?php if ($page->blog_category){ foreach($page->blog_category as $cat){ echo"<a href=\"{$cat->url}\">{$cat->title...
-
Hi I try to build a simple basic responsive layout / profile with pocket grid... So it would be great to set additional values as variables. IE conditional comments could be build by a module to generate the needed code. I would use $config->styles and $config->scripts to build a filenameArray...
- 1 reply
-
- responsive
- layout
-
(and 4 more)
Tagged with:
-
Hi everyone, thanks in advance for your help. I have an Event set up using a datetime field. I'm trying to grab the earliest event that has not yet passed, e.g. soonest upcoming event. This is what I have so far. <?php $today = mktime(0,0,0,date("m"),date("d"),date("Y")); $events = $pages...
- 16 replies
-
- conditional
- foreach
-
(and 1 more)
Tagged with: