The current header has problems.
1) It assumes that a term always has a header image. In case that image is missing, it looks completely broken.
2) The implementation is a bit complicated, with two extra views used to assemble the header.
3) The fact that the header links are in another view that is absolutely positioned means that the parent (header) div can't stretch to accomodate
additional links (so if the header has a background color instead of an image, it still won't stretch so that all links fit)
Solution:
Remove the "taxonomy title" view completely.
Add a preprocess function to the collection view, get the current tid from the url, fetch the title and background image (or fallback to background color).
Theme the collection view so that the header includes the title and the image / color.
Theme the collection block (providing the links) so that it's positioned relatively, allowing the header to stretch.
Comments
Comment #1
GuGuss CreditAttribution: GuGuss commentedCommited here : https://code.drupalcommerce.org/#/c/284/
Still a Work in progress...
Comment #2
Cookiz CreditAttribution: Cookiz commentedTheming has been updated, good to go.
https://code.drupalcommerce.org/#/c/284/
Comment #3
bojanz CreditAttribution: bojanz commentedChanging to RC blocker, since we don't have time to do it in time for beta1 (the current version isn't mergeable).
Comment #4
bojanz CreditAttribution: bojanz commentedMerged the latest reroll.
TODO (for Cookiz):
1) Fix the CSS for the header links so that it uses position: relative instead of position: absolute. Test on "no demo store" to make sure that the
header stretches properly (all links still inside the div with the background).
2) Remove the background-color from the style tag in the two tpl files, and add that to the appropriate themes.
Comment #5
Cookiz CreditAttribution: Cookiz commentedComment #6
Cookiz CreditAttribution: Cookiz commentedhttps://code.drupalcommerce.org/375
Comment #7
vasikeis that ok to use inline CSS, instead of using CSS classes?
Comment #8
bojanz CreditAttribution: bojanz commentedThe inline CSS was removed. It's all good now.
Comment #9
vasikenot of all it:
/ modules / commerce_kickstart / demo_content / commerce_kickstart_product_ui / theme / views-view--collection-taxonomy-term--page-1.tpl.php
the file:
http://drupalcode.org/project/commerce_kickstart.git/blob/refs/heads/7.x...
the last commitdiff :
http://drupalcode.org/project/commerce_kickstart.git/commitdiff/975a0c58...
Comment #10
bojanz CreditAttribution: bojanz commentedThat one needs to be there, the only way you can set the background to be the term image (which varies per term of course)
Comment #11
vasikeoh. i see.
sorry, my fault
thank you