-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
De nada
-
You also have to iterate the pages inside the page field foreach($page->banners as $banner) { foreach($banner->pagefield as $p) { echo $p->title; } }
-
How to retrieve possible pages list in a Page field
diogo replied to tsdtsdtsd's topic in General Support
Ah!!! Ok, i did a print_r on $fields->pagefield->data, and got this: Array ( [derefAsPage] => 0 [parent_id] => 1044 [labelFieldName] => title [inputfield] => InputfieldPageListSelectMultiple [size] => 10 [required] => 1 ) So, you can get the parent id like this: $fields->pagefield->data['parent_id'] And the children like this: $parentId= $fields->pagefield->data['parent_id']; $children= $pages->get($parentId)->children; edit: this feels a bit hackish. I wonder if there's a simpler way to do this in PW... -
How to retrieve possible pages list in a Page field
diogo replied to tsdtsdtsd's topic in General Support
This happens because the page field is retrieving an array of pages, and not the page itself. You can solve it by choosing "single page" on the field setting, or by iterating through the result with a foreach(), or by choosing the first element on the array $page->pagefield->first()->children -
I didn't know this. Thanks Pete!
-
Membership management through link to IP_Board
diogo replied to ceberlin's topic in Wishlist & Roadmap
There is a e-commerce module being developed by Apeisa. You can follow it here http://processwire.com/talk/topic/550-e-commerce-with-processwire/- 6 replies
-
- authentification api
- membership
-
(and 3 more)
Tagged with:
-
for this kind of relations i think the best way is to use the Page FieldType. you can put one on the race template where you can choose the teams, and one on the teams template where you can choose the people.
-
ProcessWire CheatSheet Poll - How much do you use it?
diogo replied to Soma's topic in API & Templates
maybe they can be there filtered, just like the advanced things -
I posted before on the forum this article in German http://web-developer-blog.com/2012/04/processwire-das-geniale-opensource-cms.html You can use google translate, just as i did
-
What if you put the whole path on the post template? echo "<img src='http://{$config->httpHost}{$page->image->url}'>";
-
Getting some pages, except the current one
diogo replied to Michael van Laar's topic in API & Templates
You can use $array->remove($page) As Soma likes to do: http://processwire.c...->remove($item) -
Nesting Fieldset and FieldsetTab doesn’t work
diogo replied to Michael van Laar's topic in General Support
Funny I tried this and could reproduce the same error, then I created a new fieldset and everything worked, then I tried again with the previous and it worked again... now I can't reproduce the error anymore and I'm not sure what changed. Still, make sure that the seo-serp_END field is really of FieldsetClose type. Or just delete it and create a new one to see if it works.- 5 replies
-
- fields
- FieldsetOpen
-
(and 1 more)
Tagged with:
-
Welcome to the forum Seán! A similar question was asked just yesterday here in the forum. You should find the answer you need there http://processwire.com/talk/topic/1467-multiple-images-and-basic-questions/
- 1 reply
-
- 1
-
Still it does behave nicely when resizing the brower. I would just put a transparent 2px border under all the nav links, so you don't have the behavior that it's happening now (because there is a border only on the active link, the others don't flow well under it). Like this they will stack nicely under each other. Also wouldn't hurt to make the image smaller when the browser is resized. You can do this for instance: #photo{ width:100% max-width:1000px } EDIT: concerning the image. Even nicer would be to have the logo as a transparent png above it, and crop the left part of the image as the browser is resized down, keping the logo in place. Like this you will have a responsive website without any media query
-
Soma, you can do this without having to upload them again?
-
I don't think you have this option via the API... The only way i can think of doing it without messing around with the dB, would be creating an extra field that would have a sequence like "0,1,2,3,4,5,6,7" with the same number has the amount of pictures, and updated accordingly to change the order of the pictures in the frontend "4,7,2,1,6,3,0,5". To output the pictures, you would convert the field to an array and iterate through it. $sequence = explode(",", $page->extra_field); $images = $page->images; foreach ($sequence as $i){ $image = $images->eq($i); echo "<img src='{$image->url}' alt='{$image->description}'>"; } too complicated?
-
Hi, and welcome to the forum. I made exactly this same question to myself, and I think I even asked somewhere in the forum. I don't remember what the answer was, but I think I know the reason why this isn't possible. The thing is that, you have a one-to-one relation between fields and pages on the database, So, although you can give the field a different name on each template, for the database they are always the same field, and so, they just can't be repeated in a row/column logic associated to the same page. Am I right? I hope I'm not saying something completely wrong I would definitely use the second option.
-
Welcome to the forum! What you are describing is exactly the opposite of how ProcessWire works. This would imply that all markup would be generated by the system instead of by you, and remove all the flexibility that is the core of this system. Not saying that one day there can't be a module that will allow this, but for now, I find it very unlikely.
-
Maybe surprisingly, I don't use any I use some extensions though.
-
Why don't you simply populate the title with the native id? edit: lot's of whys
-
Show highlighted search keywords in search results?
diogo replied to MarcC's topic in General Support
Dave, here is a bookmarklet made especially for you javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){$('.searchlite').removeClass('searchlite');}); -
We don't want people to have access to the trash so they can't irresponsibility delete some important thing, right? What about giving them access only to recover things?
-
Show highlighted search keywords in search results?
diogo replied to MarcC's topic in General Support
Maybe you can pass the query on the url via GET, or even parameters, and prepare the templates to do a str_replace on the fields.