Skip to content

Commit

Permalink
Merge pull request #184 from misterboe/csswrap
Browse files Browse the repository at this point in the history
[TASK] Add posibility to set CSS wrap classes for Grids in Constants
  • Loading branch information
randomresult committed Sep 30, 2014
2 parents 19c7cd9 + 25a6c6a commit 7cbcfcc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Configuration/TypoScript/Settings/constants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ plugin.tx_fluidbootstraptheme.settings {
# cat=FLUIDBOOTSTRAPTHEME/settings; type=int+; label=Width of sidebar (what remains of a 12-column total is used by main content)
distribution = 4
# cat=FLUIDBOOTSTRAPTHEME/settings; type=int+; label=Number of grid columns: Set this to the same number used in your custom Bootstrap CSS if you've switched from the default 12-grid
gridColumns = 12
gridColumns = 12

}

plugin.tx_fluidbootstraptheme.settings {
# cat=FLUIDBOOTSTRAPTHEME CSS/settings; type=string; label = CSS wrapper Classes for Grid Container (comma separated list)
colwrap = first, second, third
}
1 change: 1 addition & 0 deletions Configuration/TypoScript/setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugin.tx_fluidbootstraptheme.view {

plugin.tx_fluidbootstraptheme.settings {
gridColumns = {$plugin.tx_fluidbootstraptheme.settings.gridColumns}
colwrap = {$plugin.tx_fluidbootstraptheme.settings.colwrap}
menu {
main.entryLevel = 0
sub.entryLevel = 1
Expand Down
5 changes: 4 additions & 1 deletion Resources/Private/Templates/Content/FourColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ <h3>
</flux:grid>
</flux:form.sheet>
<flux:form.sheet name="additionalCSS">
<v:variable.set name="settings.wrapdropdown"
value="{v:variable.typoscript(path: 'plugin.tx_fluidbootstraptheme.settings.colwrap')}" />
<flux:field.select name="settings.grid4.wrapclass" items="none,{settings.wrapdropdown}" label="Choose a Wrap Class" default="none" />
<flux:field.input name="settings.grid4.rowCSS" size="10" />
<flux:field.input name="settings.grid4.col1CSS" size="10" />
<flux:field.checkbox name="settings.grid4.col1hide" default="0" />
Expand Down Expand Up @@ -65,7 +68,7 @@ <h3>
</f:section>

<f:section name="FrontendColRenderingGrid4">
<div class="row {settings.grid4.rowCSS}">
<div class="row {settings.grid4.rowCSS} {f:if(condition: "{0: settings.grid4.wrapclass} == {0 : 'none'}", else: '{settings.grid4.wrapclass}')} ">
<f:if condition="{settings.grid4.split}=='more'">
<f:then>
<div class="{settings.grid4.col1width} {settings.grid4.col1CSS} {f:if(condition: settings.grid4.eqh, then: 'equal-height')} {f:if(condition: settings.grid4.col1hide, then: 'hidden-xs')}">
Expand Down
5 changes: 4 additions & 1 deletion Resources/Private/Templates/Content/ThreeColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ <h3>
</f:if>
</flux:form.sheet>
<flux:form.sheet name="additionalCSS">
<v:variable.set name="settings.wrapdropdown"
value="{v:variable.typoscript(path: 'plugin.tx_fluidbootstraptheme.settings.colwrap')}" />
<flux:field.select name="settings.grid3.wrapclass" items="none,{settings.wrapdropdown}" label="Choose a Wrap Class" default="none" />
<flux:field.input name="settings.grid3.rowCSS" size="10"/>
<flux:field.input name="settings.grid3.col1CSS" size="10"/>
<flux:field.checkbox name="settings.grid3.col1hide" default="0"/>
Expand Down Expand Up @@ -84,7 +87,7 @@ <h3>
</f:section>

<f:section name="FrontendColRenderingGrid3">
<div class="row {settings.grid3.rowCSS} ">
<div class="row {settings.grid3.rowCSS} {f:if(condition: "{0: settings.grid3.wrapclass} == {0 : 'none'}", else: '{settings.grid4.wrapclass}')} ">
<f:if condition="{settings.grid3.split}=='more'">
<f:then>
<f:render section="FEMoreGrid3" arguments="{_all}"/>
Expand Down
5 changes: 4 additions & 1 deletion Resources/Private/Templates/Content/TwoColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ <h3>
</f:if>
</flux:form.sheet>
<flux:form.sheet name="additionalCSS">
<v:variable.set name="settings.wrapdropdown"
value="{v:variable.typoscript(path: 'plugin.tx_fluidbootstraptheme.settings.colwrap')}" />
<flux:field.select name="settings.grid2.wrapclass" items="none,{settings.wrapdropdown}" label="Choose a Wrap Class" default="none" />
<flux:field.input name="settings.grid2.rowCSS" size="10" />
<flux:field.input name="settings.grid2.col1CSS" size="10" />
<flux:field.checkbox name="settings.grid2.col1hide" default="0" />
Expand Down Expand Up @@ -61,7 +64,7 @@ <h3>
</f:section>

<f:section name="FrontendColRenderingGrid2">
<div class="row {settings.grid2.rowCSS}">
<div class="row {settings.grid2.rowCSS} {f:if(condition: "{0: settings.grid2.wrapclass} == {0 : 'none'}", else: '{settings.grid4.wrapclass}')} ">
<f:if condition="{settings.grid2.split}=='more'">
<f:then>

Expand Down

0 comments on commit 7cbcfcc

Please sign in to comment.