ttbb
Members-
Posts
13 -
Joined
-
Last visited
Everything posted by ttbb
-
StaticWire - Covert pages to static HTML
ttbb replied to christophengelmayer's topic in Modules/Plugins
i've a PW site which needs to save some pages with a JSON and/or XML output in a separate folder as static files. after my research ProCache seems to be a bit over-featured for this use case. is there a way to skip the separate setup > static site generator > generate action and have only such pages with the output mentioned above to be rendered automatically to a static file after saving the page in the backend? any hints / tips / suggestions / advieses are highly appreciated! thanks for listening! -
hi all, as far i've been getting familiar with PW up to now i learned about the frontend editing that i can edit text fields/areas easily on single pages. but how do i make this work when i'm displaying several pages with a listing template? let's say i have a news content type: when i use a template e.g. news.php to display one news article on a page, i get the frontend editing there active without problems on a listing page like a news archive with a template e.g. new_list.php i collect some news pages with a page array and write the items field values into an array to later produce the output html. i tried to use the <edit> tag and the edit-attribute in a <div> in the output but with no avail. so where should i head to when i want to make e.g. all news article news_body fields on my listing page editable? any hints are greatly appreciated! thanks for listening!
-
allow access to single php files in templates folder for ajax processing
ttbb replied to ttbb's topic in General Support
thank you guys for your helpful answers! as i'm still a pw rookie this helps a lot! crawling through all the articles and posts mentioned here i ended up with an approach mostly similar to what @Pixrael suggests and i'm happy to see this work like a charm ?? -
i've a (kind of) shopping cart function and a customized form processing which are both handled with ajax. data is transported via json. xhttp get or post requests to php files inside of the sites folder or its subfolders are blocked by the .htaccess files on the different levels of the directory architecture. i tried to fiddle around in these htaccess files with the mod_rewrite and files_match sections, but with no avail and i besides it don't like it very much to drill holes into a security concept. how do make this (not so exotic) procedure work in processwire. may i have overseen something here? are there any straightforward methods in processwire i've missed? thank you all for any hints! thomas
-
thanks bernhard, this looks pretty handy!
-
WOW! ? thanks a lot, guys! awesome! ??? i didn't expect such helpful and detailed answers, especially when it's coming with a complete code snippet! hopefully i can give back some knowledge to this community when i'm not a pw rookie anymore ? this helps a lot! best thomas
-
hi there, i've an old website which isn't running with the one of the wellknown CMSes but as a pretty primitive/barebone "home grown" php/mysql construction. now it comes to migrate/import the data from this old website to a new processwire site. one additional requirement is a structure change in the data which should be reflected during the import: it's an art gallery website and currently all artwork entities have an artist entity as a cross reference. this should be changed to the new structure in pw where an artwork template based pw page needs to be a child of an artist template based pw page. i browsed xml/json/import related modules but didn't really find what i'm looking for. of course i'm prepared to write a JSON or XML output script for the old site to prepare data for a correct import if this makes sense or might be useful. do anybody of you have an idea where to start? thanks thomas
-
thanks for this hint! ? in between i changed the whole site structure to a more logical tree approach with the artworks now forced to be children of an artist. that works very well now ?
-
How to access a class outside of processWire?
ttbb replied to Peter Oehman's topic in General Support
bd() is nice as well. thanks for this additional hint! ? -
How to access a class outside of processWire?
ttbb replied to Peter Oehman's topic in General Support
thanks a lot for pointing me to tracy debugger. the d() method is what i'm looking for ? -
How to access a class outside of processWire?
ttbb replied to Peter Oehman's topic in General Support
i've a problem mutally in the same area: coming from drupal where krumo (http://krumo.kaloyan.info/) is part of the widely used development module and an easy way to insert krumo(object/variable/array) at any place to have a handy you have a collapsed view of the input as a great replacement of print_r. i'm frequently using it also in php projects (without namespaces). i include it in processwire like this: define('dir', dirname(__FILE__)); include_once(dir.'/includes/krumo/class.krumo.php'); krumo::$skin = 'orange'; // just a theme of krumo krumo works fine as expected as long as i use e.g. »normal« php arrays. when i hand over a WireArray, e.g. a page array it stops working with fatal errors, obviously due to krumo being called as class inside of another namespace. i fiddled around with the $wireArray->getArray() method, but no avail. how can i globally display the processwire objects the same way as standard php objects? ... or does anyone an alternative method of displaying any kind of data (objects/arrays/variables) for debugging with a page? -
hi there, i'm pretty new to processwire after switching to a more slim, less dependency affected and more customizable CMF after 15 years with drupal ? after some weeks with tests and with staring up a new project i didn't regret my switch ? currently i'm working on an art gallery website, in its core consisting of two pages types with their respective templates: artists and artworks. artworks are mandatory connected to an artists. the URLs are /artists/someArtistsName and /artworks/someArtworksTitle. for better readable (SEO) and semantic usable URLs i want to have the artworks URLs automatically rewritten to /artworks/someArtistsName/someArtworksTitle after an artwork page has been created. inside of the artworks template the artist lives in a field with page reference type. i did intensive research here in the forum and on the web but didn't find a solution. maybe there's module for this? or how can i do this by adding this to the artworks template (hooks?). my be the collective community knowledge can point me in the right direction? any help is appreciated very much! best from vienna / austria thomas