-
Posts
4,314 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
solved Passing (PW)variables to jquery script
diogo replied to formmailer's topic in General Support
Still, it's a good idea to rename it to .php if it will be in a not protected folder. Never to much to remind -
solved Passing (PW)variables to jquery script
diogo replied to formmailer's topic in General Support
Not if you include it with php... in this case, (.js) wouldn't be any different from (.inc) -
solved Passing (PW)variables to jquery script
diogo replied to formmailer's topic in General Support
Ok, if the js file stays in the assets folder, you really should do this... -
solved Passing (PW)variables to jquery script
diogo replied to formmailer's topic in General Support
well, you can... just put <?include(yourfile.js);?> between <script> tags -
Your code looks longer mainly because your variables and field names are also very long. The same code looks shorter like this: $settings = $pages->get(123); $sname = $settings->simple_name; echo $sname; You can put all your variables on "settings.inc" file, for instance, and include it on the "head.inc" file, or whichever file that you know will be included by all the templates. EDIT: changed get('name=site-settings') to get(123) to make it even shorter
-
I don't use Mac, so I can't help you here. Let's wait that MAMP users appear
- 14 replies
-
- root
- sub folder
-
(and 1 more)
Tagged with:
-
Must be the permissions. Give maximum permissions recursively to all the folder to see if it works, and then adjust them to the required ones. If you need help for doing it on mac, check here http://support.apple.com/kb/HT2963 EDIT: And welcome to the forum
- 14 replies
-
- root
- sub folder
-
(and 1 more)
Tagged with:
-
Hm... I think the writing style should be free
-
This is great, raydale!
-
It's great that people are coming with modules like this, but the reason PW is so flexible, is because it's so easy to build your own snippets of code to achieve this kind of things. I have mixed feelings concerning the modules, and tend to prefer the idea of the snippets repository...
-
TinyMCE: Color picker suggesting colors from other pages/fields?
diogo replied to Lars282's topic in General Support
As I understand, you want to apply the color to emphasize those lines. I think it would be best to do it with css. So, just make those lines "Italic" on the text area, and colour them with css, based on the class of that article: article.category1 em {color:'blue'}; article.category2 em {color:'red'}; article.category3 em {color:'green'}; article.category4 em {color:'yellow'}; EDIT: or choose "bold", or "underline" instead... but i would say that em is more semantic in this case -
Hey, no problem at all! Don't hit yourself mate
-
Have a look here: http://processwire.com/talk/topic/364-failed-test-for-json-support/
-
In this case, would even be better to have a page and a template (not connected with a file) only with the fields for the sidebar, and call them from building_block_a.inc.php like this: $pages-> get(123)->name_of_field where 123 is the id of the sidebar page
-
I think there is a limit, so the website doesn't accept an infinite number of different urls for the same page. EDIT: I thought I should explain this better. You should have the segments under control so you can prevent the URL to accept anything that is thrown at it. So, it makes all the sense to have the limit. Also pay attention to what is advised when allowing the segments:
-
A different way of using templates / delegate approach
diogo replied to Soma's topic in API & Templates
Adam, I think we just answered at the same time... don't be so harsh on yourself -
A different way of using templates / delegate approach
diogo replied to Soma's topic in API & Templates
On Robert's code, I count 18 characters less if you do -
A different way of using templates / delegate approach
diogo replied to Soma's topic in API & Templates
Ya, I know! But if the server doesn't support <?, it won't support <?= neither... So, what I'm saying is: if you are going to use <?= in one statement, why not use <? in all the others also? Or, if you are concerned that the server doesn't support them, don't use neither. EDIT: Or am I wrong here? I thought they where both shorthands -
A different way of using templates / delegate approach
diogo replied to Soma's topic in API & Templates
Robert, I noticed that you used shorthand syntax on only one place of your template <?= $page->rootParent->title; ?> I would change that to the complete syntax, just in case the server doesn't support the previous. Or, since in PHP 5.4, the shorthand syntax will always be activated, I would change all the others to <? include "blocks/htmlhead.inc"; ?> -
You're completely free to do it the way you want. Check this post where people discuss other ways of organizing templates and where Ryan explains why this is the chosen form for the default install http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/page__fromsearch__1
-
I meant, replacing wire('pages')->get(1187)->url for $wire->pages->get(1187)->url But I thought you where bootstrapping PW by including the index file. In this case, maybe you can add some parameters to the function, and put those calls there.
-
Should work... did you try also with $wire->pages?
-
Thinking about building an "easy" site profile
diogo replied to statestreet's topic in Themes and Profiles
I'm not on my computer, so I can't test it. No screenshots? -
It works great Ryan! I'm in love with this new feature! Repeated fields and field-template context, used in the right amount, are extremely powerful for creating a friendly edit environment. I really think this brings PW to a new dimension