-
Posts
1,147 -
Joined
-
Last visited
-
Days Won
4
Everything posted by onjegolders
-
Haha, thanks for the replies, I see this was one topic with no replies! It's mainly for the media on pages which aren't galleries, so they're not critical but it's a shame when they don't use images for the billboard area which makes the site look better (in my opinion). On the flipside, if I have all fields in one place, things can get a little busy.
-
Hi Diogo, thanks for the feedback. The icons look a lot better when there's more of them, they're triggered when their details are entered on the settings page, I've added it in temporarily to see the effect. I've also redone how it works on smaller screens, though I find it hard to fit everything in and not take up to much vertical space... Would you keep the homepage slider the same height, I'm thinking it may be taking up too much room and may be better less height like on the other pages, I'm not sure? For the pictures, you're right they look a little small on smaller screens though I don't really think I can change that as they are set to crop but bootstrap is fluid on smaller screens, so I think that's why they're getting reduced? Cheers Joshua!
-
Thanks fmgujju! Yep, can't imaging building sites without it (or an equivalent) now. Think I'll still have to tweak the mobile and tablet version and maybe reduce the homepage slider a bit but think it's better than the last version I did anyway!
-
Cheers Luis! Thanks Matthew, I used Ryan's form-builder module as it's so easy to setup, though for really custom forms, sometimes native PHP is best bet. Are you trying to implement some?
-
Thanks Martijn, you're probably right! Is there any fallback for select menus without js that you know?
-
I've just redone a charity website for a charity we're involved with, using the "profile" I'm developing. It will fill out more as they add content. Icons are added when they specify twitter ids, RSS etc. There are also events pages, testimonials, partners, categories but they are by default unpublished. Latest blog posts are populated lower down when they get round to doing some, so it's not in it's finished state! http://www.madhatterscharity.com
-
solved How to set (un)Published for a page in the API
onjegolders replied to PHPSpert's topic in API & Templates
I'm having a problem where I can test for Hidden but the unpublished test is failing: <?php $events_page = $pages->get("template=events"); $galleries_page = $pages->get("template=galleries"); if ($events_page->is(Page::statusHidden) || $events_page->is(Page::statusUnpublished)) { } else { $events = $pages->find("template=event, sort=-event_date, limit=3"); } if ($galleries_page->is(Page::statusHidden) || $galleries_page->is(Page::statusHidden)) { } else { $galleries = $pages->find("template=gallery, images.count>0, sort=-created, limit=3"); } if (count($events) || count($galleries)) { ?> Not too sure what's happening but have definitely set my Events page to unpublished... I've got around it using: <?php $events_page = $pages->get("template=events"); $galleries_page = $pages->get("template=galleries"); if ($events_page->viewable() && $events_page->isHidden() == false) { $events = $pages->find("template=event, sort=-event_date, limit=3"); } if ($galleries_page->viewable() && $galleries_page->isHidden() == false) { $galleries = $pages->find("template=gallery, images.count>0, sort=-created, limit=3"); } if (count($events) || count($galleries)) { ?> -
Soma and Martijn, thank you both, I have no idea why but I hadn't seen your replies until now, I apologize. I ended up using a slightly adapted version as you'd need the "onchange" part of the select: <select id="mobile_menu" class="visible-phone flr" onchange="location = this.options[this.selectedIndex].value;"> <?php $mobile_nav = $modules->get("MarkupSimpleNavigation"); $options = array( 'has_children_class' => '', 'levels' => false, 'max_levels' => 2, 'show_root' => true, 'selector' => 'template!=blog_entry|gallery|category|partner|portfolio_entry|event|testimonial|project_skill', 'inner_tpl' => '<optgroup label="¬">||</optgroup>', 'list_tpl' => '||', 'item_tpl' => '<option value="{url}">{title}</option>', 'item_current_tpl' => '<option value="{url}" selected="selected">{title}</option>' ); echo $mobile_nav->render($options); ?> </select> Thanks again!
-
I'm on a mission! Trying to give back after all the millions of questions I've asked myself....
-
To give you more of an example, you create fields for everything in Processwire so you may create a template "event" For your events, you want to create A date A venue A category Multiple images Files To do this, you would first create the fields, selecting the type of field needed (there is much more information available in the docs) then you go to your chosen template and assign the fields to that particular template. Say that you have a date field called event_date. You could output that in your template using $page->event_date You will use the $page variable whenever you are accessing data from the page you are currently on. If you need to get a field from another page, you would use the $pages variable.
-
Hi Ziusurda, You need to setup your templates and fields in the admin section of your website and then use the API to output your content in your templates. Take a very simple example: You create a template called "basic.php" <!-- Basic template--> <h1><?php echo $page->title; ?></h1> <h6>Created by: <?php echo $user->name; ?></h6> <div class="body_copy"> <?php echo $page->body; ?> </div> Then in the admin, go to Setup->Templates and click Add, basic.php will show up, you can then assign fields to this template (you can add new fields at Setup->Fields) Then create a page on the page tree and give it the template "basic". Now fill in the title and the body. If you go to your website and view the page you created you ought to see the content you have outputted. This is of course a very basic example. The API is very powerful and will enable you to output almost any content in almost any way you like.
-
EDIT - I'm a dummy who should learn to check his code before saying silly things. Crop module is working fine, still don't know what's wrong with my dev to live import/export process
-
Ok great thanks, I'll upload it to the same server Edit: hm no, GD is not the problem...
-
Thanks Pideluxe it was more that the module was throwing errors when I tried to go to the template settings page in the admin but as Apeisa says it's not for production. I really like the way it makes the page list look though
-
Thanks Made and Andrew, so you think it's a file size issue? Don't think the images were even that big, it feels more like that somewhere in the process of exporting my profile, something went wrong - though I have no idea what as I followed all the steps? I've since deleted off the server and seeing as it takes about 367889999967 years for me to upload via FTP will try again later when I have another profile site to upload Will let you know, thanks!
-
I also think, the repeaters can often be a bit clunky, not sure if there is a way to have them closed by default (can't see it in the field settings?).
-
Thanks Diogo, will check that out
-
Unfortunately Template Decorator (though great) is causing all sorts of problems when migrating a site. It gave me errors when installing a profile and template pages in the backend are blank. I got an error "no class 'on'" or some such like?
-
Hi Apeisa, I'm getting the following JS errors: Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://mysite.com/processwire/page/edit/?id=1 Uncaught TypeError: Cannot read property 'error' of null http://mysite.com/wire/modules/Inputfield/InputfieldFile/InputfieldFile.js and lots of: Failed to load resource: the server responded with a status of 404 (Page Not Found) with links to the image file and timestamp on the end Am thinking something must have gone wrong with the file transfer?
-
I think you can just use the normal API so: if your page field links to multiple pages: foreach ($page->page_links as $link) { echo "<h2>$link->title</h2>"; echo "<h4>$link->other_field</h4>"; } if not, it ought to just be: $page->page_link->my_field
-
Hi guys, I've seen this has been an issue for others but it involved PHP safe_mode being on which isn't the case here. I've just transferred a site from dev to live using the site export module and when I go to upload a new image, the bar goes all the way to 100% and then the image doesn't show. Could anyone point me in the right direction? Am pretty sure assets is writable...
-
Thanks Soma! Will check this out...
-
Thanks Soma, not sure whether it would be useful to others to have a reset or not but it may be. Is a colorpicker field essentially always set? For now, using a checkbox alongside it works fine
-
Can you try with 33% 34% 33%? That's what I use and haven't had an issue
-
My friend launched this book about Shopify for Ryan, or anyone else who's interested in combing it with PW. http://www.shopifyandyou.com/