Page Attributes?
Permalink Browser Info Environment
Can I also add page attributes to the overview page with this Add-On?
Lets say I have a "year" and a "author" page attribute (not block!) for an article page and I want the year and the author to be displayed in the overview of the Pagelist. Is that possible with this Add-On?
Lets say I have a "year" and a "author" page attribute (not block!) for an article page and I want the year and the author to be displayed in the overview of the Pagelist. Is that possible with this Add-On?
Type: | Discussion |
---|---|
Status: | New |
It's possible with some custom code. Please let me know what level you're at with HTML, CSS and PHP -- it's okay if you're not familiar with those, I just need to know what kind of answer to give you.
I'd say I'm okay with HTML and PHP, but I don't know much about the concrete5 framework code yet. So I know the php functions and such, but I'm not familiar with the block and area classes etc.
Hope you can still help me though :)
Hope you can still help me though :)
Below is my first recommendation. If it winds up being too complicated for you, feel free to post back here and I can give you a simpler (but less flexible) solution.
What I suggest you do is skip the Page List Teasers addon entirely and create your own custom template for the Page List block. The normal way to do this is to copy the built-in template for the block and modify that to your liking. But the problem is that the built-in template for the Page List block is incredibly messy and difficult to understand and to modify. However, I've created a custom template that I think is much easier to customize, and it also includes sample code to show you how to do different things. Here's how it works:
1) Create a new directory on your server at SITEROOT/blocks/page_list/templates/
2) Go to this page:
https://raw.github.com/jordanlev/c5_clean_block_templates/master/pag...
3) Save that page as something like "attribute_display.php" (doesn't really matter what you call this, as long as it is all lowercase with underscores instead of spaces).
4) Move that file into the directory you created in step 1.
5) Edit the file. Hopefully the code is self-explanatory, but if not post back here and I can show you exactly how to do what you want to do.
6) On your site, go to the page that has the Page List block, go into Edit mode, click on the block and choose "Custom Template" from the popup menu. Choose the template that matches the name you gave to your custom file in step 3 (for example, "Attribute Display"). Click the "Update" button, exit edit mode, and publish your changes.
Voila! You now have complete control over your page lists, and are on your way to being a C5 master.
What I suggest you do is skip the Page List Teasers addon entirely and create your own custom template for the Page List block. The normal way to do this is to copy the built-in template for the block and modify that to your liking. But the problem is that the built-in template for the Page List block is incredibly messy and difficult to understand and to modify. However, I've created a custom template that I think is much easier to customize, and it also includes sample code to show you how to do different things. Here's how it works:
1) Create a new directory on your server at SITEROOT/blocks/page_list/templates/
2) Go to this page:
https://raw.github.com/jordanlev/c5_clean_block_templates/master/pag...
3) Save that page as something like "attribute_display.php" (doesn't really matter what you call this, as long as it is all lowercase with underscores instead of spaces).
4) Move that file into the directory you created in step 1.
5) Edit the file. Hopefully the code is self-explanatory, but if not post back here and I can show you exactly how to do what you want to do.
6) On your site, go to the page that has the Page List block, go into Edit mode, click on the block and choose "Custom Template" from the popup menu. Choose the template that matches the name you gave to your custom file in step 3 (for example, "Attribute Display"). Click the "Update" button, exit edit mode, and publish your changes.
Voila! You now have complete control over your page lists, and are on your way to being a C5 master.
Thank you so much, that really helped me out!
I got everything working now, got the attribute information displayed like I want it to be.
Thank you again!
I got everything working now, got the attribute information displayed like I want it to be.
Thank you again!