-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
Very nice website! The way the menu goes to the left and the search bar goes up feels very natural. Well done
-
Progress on ProcessWire 2.2 and overview of multi-language support
diogo replied to ryan's topic in Multi-Language Support
By friendly, I was referring to having both languages in the same field (like on your screenshot), by opposed to how i would do it before (repeated fields for each language or even repeated pages) on a multi-language website implementation. I was also wondering if, instead of creating different pages on the tree for each language, it would be possible to create multi-language websites by appending a parameter with the language on the last url segment (about/es), and using them like this: $this->user->language = wire('languages')->get("$input->urlSegment(1)"); on the beginning of the template. would this change all the field calls of that page to the specified language? -
Soma, on your last example you are still printing the unnecessary html tags when the fields are not populated. LJones, you can also separate html and php like this. Although it makes the code longer, it's maybe more readable: <?php if($child->ten_email):?> <a href='mailto:<?php echo $child->ten_email?>'>email <?php echo $child->ten_first_name?></a> <br /> <?php endif;?> or, with short tags: <?if($child->ten_email):?> <a href='mailto:<?=$child->ten_email?>'>email <?=$child->ten_first_name?></a> <br /> <?endif;?> And yep, I would also remove all those echos. Readability of the code is more important than indentation on source view
-
@Jasper: same time
-
hm... you want to do this for each children, right? So, what you have to use is a foreach() command foreach($page->children as $child) { your table goes here; } Inside the table you can refer to each page, exactly as you did: {$child->title} as i understood, you want to test if the field was populated to the corresponding sentence. Then you would have to do this for each one of them: if($child->ten_email) { echo "See website</a><br /><a href='mailto:{$child->ten_email}'>{$child->ten_email}</a>"; } I hope I understood well what you asked. Also, you should notice that in your code, in case the condition wouldn't be satisfied, the table closing tag would be echoed alone because it's the only element outside the IF block. UPDATE: Ah, I was completely distracted! I mixed the website with the email... sorry, I'm glad you got it right
-
Progress on ProcessWire 2.2 and overview of multi-language support
diogo replied to ryan's topic in Multi-Language Support
Great news Ryan! So I still recommend structuring your site with multiple trees rather than relying on multi language fields I still think these fields could be useful for this. Couldn't we have a way of calling the field on the language we want like this $page->title->es? Like this we could still prepare one page for each language, and have a friendly form for the editor. -
FieldType Image and creating new multi-part repeatable fields
diogo replied to Rob's topic in Modules/Plugins
I'm glad Ryan came to help. Rob, I still think I wasn't that far though, since repeatable fields will make all this process so much easier. -
FieldType Image and creating new multi-part repeatable fields
diogo replied to Rob's topic in Modules/Plugins
Welcome to the forums Tall (for abbreviation) Repeatable fields are on the roadmap only for August http://processwire.com/about/roadmap/ The subject is being discussed here http://processwire.com/talk/index.php/topic,53.0.html, maybe you can also throw some ideas. UPDATE: I would bet that there will be a module even before August -
Ok, I will use inline for now. thanks a lot for the answers!
-
In this case it's for a simple construction page. There will be three circles with some info and i want them to be in different positions every time the page loads.I only need dynamic margin-top and margin-left for each circle. For this one It's only one page, so I think I will do it as Apeisa suggested, but I was also wondering how to do it on a bigger website, even if it's only to have variables on css without using something like Sass.
-
Thanks for the suggestion. Fixed that as well. Nice, I think it looks more integrated like this
-
What would be the best way of having dynamic CSS in all pages without making it heavy to process? external style.php with a content-type header instead of style.css internal stylesheet on header.inc, or on a dedicated include other
-
Ryan, here are some links about the symphony module. It's called "Subsection Manager". There's also a vídeo. http://symphony-cms.com/download/extensions/view/41121/ http://symphony-cms.com/discuss/thread/41122/ https://github.com/nilshoerrmann/subsectionmanager/wiki/Subsection-Manager http://vimeo.com/22333100 UPDATE: oh, and a more recent one http://symphony-cms.com/discuss/thread/50421/
-
Much better I would also change the color of the links to be the same as the titles. They would still look like links, but with a less default feeling. I's a tiny change, but I think it makes a difference.
-
That was quick This solution solves the problem well, thanks!
-
Pete, thanks for this module. I'm using it in two under construction webpages. However i have one concern. Because it redirects to one page, the URL changes, and i'm worried that visitors might bookmark it instead of the real page. If so, when they come back, they might think the website is still under maintenance. Is thee any possibility that the change wouldn't reflect on the URL?
-
Speaking of symphony forums, i have the feeling that this will be very interesting http://symphony-cms.com/discuss/thread/79645/
-
For me they are also both very slow. Your personal website is pretty quick though. Nice post about pw
-
Progress on ProcessWire 2.2 and overview of multi-language support
diogo replied to ryan's topic in Multi-Language Support
pt-PT -
pretty quick reply here, because i'm in the middle of something. I had the same idea in January (last paragraph) Ya, It's quite true! It's a pitty that it was so unnoticed by then. But it doesn't even have to be done with ajax, processwire API can take care of this by its own, no? I think that in symphony cms there is good implementation if this method. http://symphony-cms.com/download/extensions/view/41121/ You are referring to this right? I remember it from when i used Symphony on one project. As i remember it's a slightly different approach and the implementation didn't feel that natural. Maybe because of the way Symphony works. I think in Processwire it would be much simpler to do it. Anyway, as i told in other threads, Symphony it's a very well thought CMS, and it touches PW in some points.
-
Nice! I'm glad you liked the idea It occurred to me that it might be less simple to do it as i imagined. If inside pages there are already children, The children created by the field would be mixed with them... quite confusing... Instead, maybe it would be better to have a special page dedicated to this field type (like the admin page, or the trash page). > Admin > Repeatable field type > Edited page A > Repeated field of A 1 > Repeated field of A 2 > Repeated field of A 3 > Edited page B > Repeated field of B 1 > Repeated field of B 2 > Repeated field of B 3 > Trash
-
For answering to this http://processwire.com/talk/index.php/topic,621.0.html, i revisited this thread and thought again about it. Maybe this can be done without breaking the way processwire naturaly behaves. This field type could simply mirror inside the edit page one branch of the tree. It can be only an interface to create children of a page from inside the editing of another page (or even the same, whatever...) So, while creating the field, we would only have to define a preexisting page to be the parent of our repeatable elements. On the edit page, this field type could work much like the image field already works. When adding a new repeatable element, a new page would be automatically created under the parent that we defined while creating the field. The fields for each element would be the same from the template that was chosen for the children of our parent page (or could be even different for each element of the group if the editor as permission to choose the template). Templating would target the tree normaly and ignore this field.. The editor would have the feeling of creating repeatable elements inside a page, but everything would still work on a processwire way. Would this be easy to implement has a module? I'm getting quite sleepy but i hope i was clear enough
-
This was discussed before. Here is the topic that lead to the inclusion of repeatable fields on the roadmap http://processwire.com/talk/index.php/topic,53.msg168.html#msg168 Like Soma said, the default way of doing this in processwire is using the tree