3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1689 Views |
-
PageComments holder styling (Comments template)

11 June 2010 at 3:58am
$PageComments generates such code:
<div id="PageComments_holder" class="typography">
<h4>Leave Comment</h4>
<form id="PageCommentInterface_Form_PostCommentForm" action="/stable/home/page-22/iran-pokusali/PageComments/PostCommentForm" method="post" enctype="application/x-www-form-urlencoded">...
...
</form>
<h4>Comments:</h4>
...I stylized form with float:right; so form is to the right from comments, but phrase "Leave Comment" placed to the left.
It looks unlogical, so i'd like to place it to the right - above post form, but "Comments:" will be placed to the right too it's weird and I can't use css selectors there, so i have to modify comments template, but how i can do it? -
Re: PageComments holder styling (Comments template)

12 June 2010 at 10:35pm
You can override any templates from core in your our theme. So in this case its the PageCommentInterface.ss template from cms/templates/ that you would want to copy to your theme. You can then edit the file as you wish. Make sure you ?flush=1 after making the change
. -
Re: PageComments holder styling (Comments template)

14 June 2010 at 5:18pm
Thx, but what about comments posting form?
-
Re: PageComments holder styling (Comments template)

14 June 2010 at 5:31pm
Well the actual form code is generated just like every form in SilverStripe. Using the Form.ss template and rendering the individual form fields from the PHP. For customizing the PageComments Form you could try defining a PageCommentInterface_Form.ss template in your theme.
See this page for more information on how templating a form works. http://doc.silverstripe.org/form#using_a_custom_template.
| 1689 Views | ||
|
Page:
1
|
Go to Top |


