Quantcast
Channel:
Browsing all 4235 articles
Browse latest View live
↧

Re: Vimeo URL not working in 3.0.4 WYSIWYG oembed

Hi tv,I'm not sure about the "From the web" tab you have mentioned, however I do think you should look at the codemirror module.http://www.silverstripe.org/codemirror-module/This plugin integrates...

View Article


Gridfield loop and count in template

I have a gridfield and would like to count the objects and do something if count = 2.eg:<% loop Objects %> $titleif ($count = 3)<br /><% end_loop %>Is the above possible?Posted to:...

View Article


Re: Gridfield loop and count in template

<% if $Pos = 3 %>Or if you mean the actual number of items in the list, you might be able to do:<% if Objects.Count = 3 %>Haven't tested that though, no idea if it'll work. If it doesn't...

View Article

Re: Gridfield loop and count in template

What you're looking for is $Pos or $MultipleOf.<% loop Objects %> $title <% if Pos = 3 %><br /> Position #3<% end_if %><% if MultipleOf(3) %><br /> each third...

View Article

Re: Replace CMS field name and change field type

The easiest way to do it is in your Page class getCMSFields(), untested:public function getCMSFields() {$fields = parent::getCMSFields();$fields->removeByName('Content'); // Might be 'Root.Content'...

View Article


Re: *SOLVED* Default static value in dynamically populated DropdownField

Make sure you put your site in dev mode: in _config.php add the lineDirector::set_environment_type("dev");You should then be able to see the errors properly. If you don't see them, try refreshing the...

View Article

Re: *SOLVED* Default static value in dynamically populated DropdownField

Thanks for the info about setting dev mode in _config.php - I've done it when using _ss-environment.php, but not in config before.After a bit more digging around (and chatting with a dev friend) I...

View Article

Search fields and DataObjects

The default search implementation doesn't seem to search custom fields and DataObjects associated with a page? Is it possible to change this functionality? I want the user to be able to search ALL...

View Article


Re: Adding new sub page to Home page problem

Hallo,i have problems with subpage module. I have installed the subpages module on latest version SS 3.0.1 but after installing i couldn't create new pages on any subsite and on the main site.does...

View Article


Re: Session::set set on one page, missing on the next

my colleague got the same problem and have to use _SESSION at the end. does it mean there is problem with Session::set method??Posted to: Session::set set on one page, missing on the next | Show Thread...

View Article

Re: Gridfield loop and count in template

Thanks, just found the page too.How about conditional statements?<% if $Pos=="3" %> works How about => or != I get errors when I use !="Sorry, there was a problem with handling your...

View Article

Re: Gridfield with relationEditor has_one Dataobject

This is a problem I have too. There doesn't seem to be any solution for adding/editing/deleting objects that are attached through a has_one.Sorry I can't help, I'm looking into a way to do this.Posted...

View Article

Re: Gridfield loop and count in template

There's no built-in less than/greater than, you can implement that sort of thing by creating a function in your controller. For 'not', use:<% if not $Pos=3 %>See here:...

View Article


Re: DOMDocument::saveHTML() failure after latest 3.1 pull

It has been pointed out by DirtyHam that 3.1.0 beta 2 works with 5.3.3.A quick glance shows that 3.1 and 3.1 beta are quite different in this file. The offending php method is still present in 3.1 but...

View Article

Re: Gridfield loop and count in template

Hi Kinglozzer,Do you have an example of how to write the custom functions in the controller?Posted to: Gridfield loop and count in template | Show Thread | Post Reply

View Article


Re: Gridfield loop and count in template

Controllerfunction MoreThen() { if($pos > $value) { return TRUE; } else { return FALSE; } }Template If the function is outside of the loop it works and returns "1"$MoreThen(2,1) <% loop...

View Article

Re: Gridfield loop and count in template

Found it: $Top.MoreThen(2,1)But $Pos doesn't seem to actually work.There are 5 items so " 2 is more than 1" should be fired off twice. NOthing is returned.<% if Top.MoreThen($Pos,2) %> 2 is more...

View Article


Re: [SOLVED] Set Default image if the image fetched is not found

It worked!thank you OITI!Highly appreciated!Posted to: [SOLVED] Set Default image if the image fetched is not found | Show Thread | Post Reply

View Article

Re: Gridfield with relationEditor has_one Dataobject

thanks for helpi started using multiple upload field for thisPosted to: Gridfield with relationEditor has_one Dataobject | Show Thread | Post Reply

View Article

Re: Gridfield loop and count in template

$Pos won't work when you're doing $Top. $Pos is the position in the loop, as soon as you use $Top, you take it out of that scope so it's looking for a variable called $Pos outside of the loop - it...

View Article
Browsing all 4235 articles
Browse latest View live