bipster Posted August 2, 2014 Posted August 2, 2014 Hi, I've discovered PW recently and I'm starting to get the hang of it. I'm used to build artist portfolios with the Indexhibit2 CMS and I was wondering if it would be possible to replicate one of its features in PW. In Indexhibit2 you can upload many media types (images, local and external videos, sounds, etc...) to a page and then reorder them if you want. I know that PW has a multiple image field. My question is, would it be possible to modify it to allow adding other media type items to it? Is there an exisiting module out there for this? Thanks in advance
diogo Posted August 2, 2014 Posted August 2, 2014 Welcome to the forum bipster! For the projects in our website (see my signature) I used a table field and works very well I created three templates: paragraph, images and video, and added them to the table field "content" These are the fields in each template: paragraph: text (textarea) images: is_slider (checkbox), images (image) video: mp4 (file), webm (file), poster (image) on each template I put the code for rendering each object, for example, the video template is like this: //video.php (simplified) <div class="video"> <video muted poster="<?=$page->poster->url?>"> <source src="<?=$page->webm->url?>" type="video/webm"> <source src="<?=$page->mp4->url?>" type="video/mp4"> <p>bad browser, no video for you!</p> </video> </div> and on the project pages I output all the content simply with: foreach($page->content as $c) { echo $c->render(); } 4
bipster Posted August 2, 2014 Author Posted August 2, 2014 Thanks for your suggestions!! As I said previously, I'm a newbie to all this, so your help is very much appreciated! 1
bipster Posted August 4, 2014 Author Posted August 4, 2014 I've tried the new PageTable field from 2.5dev and it's great. The only thing I don't like is the fact that you have to title every new page, which is a bit cumbersome. I guess my ideal field would be a cross between the visual design of the Repeater and the functionality of the PageTable.
diogo Posted August 4, 2014 Posted August 4, 2014 You can show the title field as collapsed in those templates, or even hidden. I collapsed them on mine because as you can see in the screenshot they are good to identify each block. It also happened that I edited some blocks directly by searching in the admin for their titles.
bipster Posted August 4, 2014 Author Posted August 4, 2014 If I collapse the title and leave the page untitled the new block appears strickenthrough. Why and what does it mean?
adrian Posted August 4, 2014 Posted August 4, 2014 The strikethrough suggests that the page is unpublished. Is that the case, or do you think it is just due to the missing title?
bipster Posted August 4, 2014 Author Posted August 4, 2014 If I add a title the strikethrough disappears
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now