Jump to content

p_hammond

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by p_hammond

  1. @hosrt: posts don't have ids, they are identified by their file name, as in 'here-is-a-title.html', 'another-title.html', 'yet-another-title.html', and so on. I'm not sure I understand the prev/next posts problem. Previous/next posts are nothing more than chronological navigation, so the system basically creates a link to the post file (here-is-a-title.html) created before and after any given post. Thanks for your help.
  2. All pages are located in one folder, that is, there's only one level. Sorry, I got confused. Here's the correct directory structure (I don't know what I was thinking ): Parent Folder -- Page 1 -- Page 2 -- Page 3 -- Blog ---- Category Name 1 ------ Posts belonging to 'Category Name 1' ---- Category Name 2 ------ Posts belonging to 'Category Name 2' ... Most pages have basically the same HTML structure, as most pages are blog posts: <!DOCTYPE html > <html> <head> ... </head> <body > <div class="wrapper"> <div class="content"> <h2 class="title"></h2> <h3 class="subtitle"></h3> <article class="content"> <p></p> ... </article> <div class="byline"> <p></p> </div> <div class="meta"> <div class="author"></div> <div class="date"></div> </div> <div class="social"> <span></span> ... </div> </div> <aside class="sidebar"> <form class="search-form"> ... </form> <div class="category-list"> <ul> <li></li> ... </ul> </div> <div class="tag-list"> <ul> <li></li> ... </ul> </div> <div class="popular-posts"> <ul> <li></li> ... </ul> </div> </aside> <footer class="footer"> ... </footer> </div> </body> </html> Only a limited number of pages, I would've thought around 25, don't follow the HTML structure posted above. These pages won't be a problem, as I'm happy to import them manually. Does this help?
  3. Thanks, folks, some interesting ideas here. @hosrt: unfortunately, the site is currently offline. That's a great link Pete, thanks for pointing it out to me. Well, now I know what it takes to import a Jekyll site, or a collection of static HTML files for that matter, into ProcessWire. It seems that, with some work and dedication, I can make it happen. To be fully honest, I was hoping for a more hands-off, plug-n-play kind of approach. I've done some further research on this matter and found a neat little script to migrate a Jekyll site into WordPress. As far as I understand, it's just a matter of running the script, and voilà. I'm going to inspect this thing further and see if I get some inspiration. I appreciate your help, folks. If you think of any other ideas, please let me know.
  4. @Kyle: You're right, Jekyll doesn't use a database at all, and this is perhaps the main roadblock. @DaveP: your link is great, but I don't think it applies to my case, as the conversion Ryan lays out is from WordPress (db-driven) to PW (obviously db-driven as well). So, it seems this task is going to be way more difficult than I anticipated. I think I'm going to hold off importing the site to PW and advise the client to stick with Jekyll for the time being. The main reason for the conversion was to give the client an easier/faster publication workflow, but I suppose I can tell him to use something like Prose to smooth the process. If you have any more ideas, please let me know. Thanks.
  5. Hey guys, I need to import a Jekyll-based website, basically a collection of 3000+ static html pages, into ProcessWire, or in other words, import them into PW's database. Is there an easy, automated way to do this? Could you please point me in the right direction? Thanks.
  6. Oh my God, this is frigging awesome! So clever and yet so easy to implement. I can certainly tell the client to visit the FontAwesome website every time they need an icon. I also like the string replacement method for the headings but, out of curiosity, how would I 'tweak' TinyMCE advanced settings to be able to get classes/other stuff on there? Would the client have to write the classes themselves? Thanks, Ryan! Go grab that icon-coffee, I'll join you with an icon-beer, virtually that is!
  7. Hi Joss, Thanks a lot for your detailed answer. I like the solution you propose for my second problem, the icon font one. It's flexible and easy to implement, and allows me to give my client some creative freedom! As for the first problem, I will probably just use two separate fields and be done with it. Somehow, it felt more efficient to use a TinyMCE field for both elements, but I guess you're right, having two separate fields gives a sense of structure and presents a clearer picture to the client as to what they are expected to do. Thanks again.
  8. Hi all, I'm using ProcessWire to build a simple site for a client and wanted to know your opinion/view on a couple of things: I'm using FontAwesome (icon font) throughout the site. In certain sections, such as in the navigation, the code to display the icons is hard-coded, but in one section in particular, I want the client to be able to choose which specific icons to display. Now, what would be the best way to do this? I was thinking that having a repeater field with a dropdown menu from which the client could simply choose the icons would do the job. What do you think? Is there a better way of doing this? Should I even give the client the freedom to do this? In the main content section, I have four different columns, each one containing two elements: a heading (h3) and a paragraph. Now, these headings all have a class, as in "<h3 class="someclass">Heading 3</h3>". I think the most efficient way of coding this would be to have a TinyMCE textarea and then just write the 'h3' and the 'p' there. But, how do I include the class? Here're the solutions I have come up with: I could of course just have a regular textarea with HTML support and write the class there, but I don't want the client to have to write or see that. I could have two separate fields, a simple textfield for the heading and a textarea for the paragraph. This would allow me to hard-code the classes. I could change the markup and have the classses in a parent element. This way, I could go ahead and use a TinyMCE textarea for both elements. What do you think? How would you do it? Thank you very much for your help. I look forward to your answers! Peter
  9. Apeisa, your code works beautifully. Thank you very much for your help, to all of you guys, you've really helped me out.
  10. OK, Ryan, thanks for the clarification. Do you know how I can use apeisa's module in this example? $projects = $pages->find("template=portfolio-item, sort=-created, limit=6"); foreach ($projects as $project) { $image = $project->images->first(); $thumb = $image->size(640,370); echo "<a href='{$project->url}'><img src='{$thumb->url}' alt='{$image->description}'></a>"; } I assume I have to place the following code, or a modified version of it, somewhere in the previous code block, but have no idea where or how. echo $page->cropImages->eq(0)->getThumb('thumbnail'); All I'm doing is calling the first image from my project pages into my homepage. Instead, I want to call the thumbnail version of the image. So, I've gone to my project pages and, using apeisa's module, I've created the thumbnails. The thing is, how do I get the thumbnails to display in my homepage? I hope this makes sense. Thanks a lot.
  11. Thanks, apeisa, it works. I have another question: is there a way I can control how images are cropped? I've noticed that it basically crops images from the centre outwards, and I would really like to have control over this. Thank you for your help, guys.
  12. I was able to use your code successfully, Wanze, and now everything is working fine. Now, I've been wondering whether I can have an original, unchanged image on an individual project page and then have a thumbnail version of that image displaying in the homepage and the project list page. Does anybody know how I could do this? Thanks.
  13. Hi Wanze, Thank you for your answer. I'm going to try your code and see how it goes. I'll report back tomorrow.
  14. Hello guys, I'm currently building my first ProcessWire site and have run into some problems that I'd like to discuss with you. Here're the details: I'm building a portfolio site with the following tree structure: Home - About - Services - Portfolio - Individual project page 1 - Individual project page 2 - and so on... - Contact The problems I'm running into have to do with managing my projects' images. Basically, I'm displaying these images in three different places: in a slider in the homepage, in the main portfolio page (/portfolio/), and then each project has its individual page. The slider in the homepage shows images of the 6 most recent projects. The slider also includes a heading, a brief description of each project and a button pointing to each particular project's url. The main portfolio page (/portfolio/) shows, again, a list of images of the 6 most recent projects. If you click on any of the links, you'll go straight into that project's individual page. Now, what I want to do is to have the images and button in the homepage's slider and the images in the main portfolio page link to each project's individual page. I also don't understand how I should approach managing all these images. For example, should I only upload the images to the individual project page and then somehow call them from the other two locations? Is this even possible? As you can see, I'm in urgent need of some guidance here. If you were building such a system, how would you go about doing it? Could you please shed some light on how I can accomplish what I want to do? Thank you in advance for your help.
×
×
  • Create New...