-
Posts
4,314 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
Make sure you do it a odd number of times, so Ryan gets at least one like from you
-
Redirect admin view links for one page website?
diogo replied to photoman355's topic in General Support
Macrura, your solution won't work because inside the render() the $page object is the one from the rendered template, so ($page != $homepage) will always be true. But the same can be achieved by testing agains the url: if($page->url == $_SERVER[REQUEST_URI]) $session->redirect($pages->get(1)->url."#".$page->name); and in the homepage, something like: foreach($page->children as $p) { echo "<div id='{$p->name}'>"; echo $p->render(); echo "</div>"; } -
I really think the best way is to use pages. If you organize things well, those pages will never get in the way of the main structure because they will be collapsed under their parent. This is how people organize data in computers for years. The fact that you use pages will allow you to use the api, and this will make it so much easier to create a frontend or backend system to consult that data.
-
Quick and dirty solution would be to had this line to your admin-theme: $(".Inputfield_repeater .ui-sortable > li").addClass("InputfieldStateCollapsed"); you could add it in the end of the main.js file for instance $(document).ready(function() { ProcessWireAdminTheme.init(); // very dirty hack to collapse the repeaters, make something nicer later $(".Inputfield_repeater .ui-sortable > li").addClass("InputfieldStateCollapsed"); });
-
Ah, ok! I got it now
-
I didn't mean to do it on the repeater field settings, but on the settings of each of the fields that are inside the repeater. I will try it. edit: it seems to work:
-
How come a new vps has a software that ended in 2010 installed? Is that normal? Did a small search and ubuntu 10.04 was already coming with php5.3 packaged... Anyway, apparently you can upgrade php with a dist-upgrade
-
Still not clear. You say 4 tabs, but there are only 3 there. Can you make a quick sketch to explain?
-
@jsantari, If I understood well, this module is intended for the images in the back end only. All it does is to replace the fancybox module that comes in the core. If you want a lightbox for the front end, just choose one and follow their instructions. If you have trouble to generate the required markup with PW, we will be here to help @nikola, maybe you can make this more explicit in the documentation?
-
You can define that option on the fields themselves. Go to input -> visibility, and choose "always collapsed". If it works on templates, it must work inside repeaters... But in my opinion, if you feel that need, you shouldn't be using repeaters. Repeaters are supposed to make your life easier and spare you from some clicks, not the opposite. If what you describe is happening, I would say, use normal pages instead.
-
The find method only accepts the pw selectors. What you are doing there seems very different to me to what Soma did in that example. The way Soma concatenated that string I can see that it will be something like this (just guessing, i didn't look at his code); // $selector = any selector f.ex. "template=basic-page," // $_REQUEST['iDisplayStart'] = 10 // $_REQUEST['iDisplayLength'] = 20 $pa = $this->pages->find("template=basic-page, start=10, limit=20"); which is a valid selector. In your selector the result of the concatenation would be something like this, right?: $values = $pages->find("parent=/LIMIT0,15"); // ?? You can't use regular mySQL queries because they won't be recognized by the method. If you want to use queries you can use query() http://processwire.com/talk/topic/2209-display-data-from-mysql-table/?p=20630
-
Body text HTML has no line breaks in code
diogo replied to Peter Falkenberg Brown's topic in Getting Started
Nik, I'm just fooling around your correction was useful for sure -
Body text HTML has no line breaks in code
diogo replied to Peter Falkenberg Brown's topic in Getting Started
@Soma: A tiny typo in your verb, change cab to can. -
Yes, $pages of course The selector I used was just for testing. It was the way that I had to form a decent array with find in a default installation
-
It was a typo indeed. I will correct it. Thanks nik.
-
You can put a checkbox on the home page, or a config page, and then something like this in the head.inc (adapt to your situation): if($maintenance && $user->isGuest()) $session->redirect($page->get('/maintenance/')); These tricks can also be tweaked to that effect http://processwire.com/talk/topic/2475-quick-tip-for-testing-on-live-website/ edit: adrian, in pw there is always an alternate way
-
In pw, if something is being too complicated you're probably doing it wrong
-
Macrura, I was listening to Holy Ghost for the last hour. Very nice, thanks
-
Soma is da man!
- 24 replies
-
- 1
-
-
Ok, late to the party after my soon answer... What I was talking about way up there is not more than a PageListSelectMultiple that shows allows you to edit the page in that same place. The relation that I did to repeaters, is because this is exactly what they do. They allow you to edit a page (that is hidden in the tree) from inside another page. So, technicaly, it shouldn't be very different to do.
- 24 replies
-
Looks interesting Ryan, you got me curious. Outside I love a strong and foamy espresso, but at home use one of these: Back to the music. This is what I'm listening to http://grooveshark.com/album/Little+Dragon/1417265
-
flushed away through the siphon! had to say it