Search

@everybody: How about blocking a section to a maximum number of entries ? I am thinking about adding this ability to the static section... Would you like it ? Or should I code a separate extension for this ?

I think I could add a "static_limit" column 1- When limit is 1 -> normal behavior 2- When limit is > 1 -> hide the create new button if number of records < limit

I'd like you 0.02$ on this please

I don't mind adding this feature as long as default value is 1, but perhaps the name of the extension should change as it no longer is ... "static" since it only limits the number of maximum entries.

@vladG: Of course, the default value would be 1.

I would still call it static since it would be a fixed number....

Knupska's version is working fine for me in 2.2.3 (for the extension compatibility info).

I simultaneously upgraded to Symphony 2.2.5 and Static Section 1.2.1. Now when I add a new section, I no longer get the option for it to be static. Existing static sections still work.

The problem is, since upgrades happened at the same time, I don't know which one caused it. Does anyone else find that these versions don't along?

Incidentally, its pretty easy to fix the new static section by editing the sym_sections table of the database, so that's a work-around if anyone else is stuck.

My version of static section is 1.6.1, and it seems to work fine. Are you sure:

  • that your version number is correct?
  • that you ran Symphony's update.php and re-enabled the extension?

One of the best and most useful extensions ever! Can't emphasize that enough...

One of the best and most useful extensions ever! Can't emphasize that enough...

Yep. I use it in almost every project. Is this still actively maintained and updated for 2.3 or do we have to take care of it?

There are pull request merges and commits as recently as two months ago, so I imagine you could update it yourself and send a pull when 2.3 reaches RC status. This could be a contender to be maintained by the symphonists account if Knupska is no longer interested.

Note that this extension cause issue with Save and Return extension (on S2.2.5) which will produce error functions on Static page, anyone test could find a fix for the upcoming S2.3?

@nickdun

Tested it, still works fine under 2.3RC1 without modification. This seems to be the most bulletproof extension ever created.

I guess the code could need a little revisit and 2.3-related spring cleaning from one of you more advanced extension developers, though (just for peace of mind).

It works if you are upgrading to 2.3RC1. But the install function throws an error on fresh 2.3RC1 installs.

Edited the install/uninstall part of the extension.driver.php as follows to make it compatible again:

/*-------------------------------------------------------------------------
    Installation
-------------------------------------------------------------------------*/

    public function install(){
        Symphony::Database()->query("ALTER TABLE `sym_sections` ADD `static` enum('yes','no') NOT NULL DEFAULT 'no' AFTER `hidden`");
    }

    public function uninstall(){
        Symphony::Database()->query("ALTER TABLE `sym_sections` DROP `static`");
    }

}

Limit Section Entries is here. It's meant to be the successor of static section. It allows arbitrary limit of number of entries in section.

NB: Symphony 2.3 only.

vladG Seems to work pretty well so far. Thanks.

Just one little request: Can you change it so the "maximum entries"-field goes BELOW the default fields for section name and navigation group?

@jensscherbl Good point. Done.

vladG Cool, thanks.

Edit:

Pending pull request for german translation... ;)

Version 1.8 throws an error when trying to create a section in Symphony 2.3:

Symphony Fatal Error: Argument `$value` is not of type `string`, given `integer`

Maybe try Limit Section Entries, supposed to be the successor to this extension.

Thanks Nick! Limit Section Entries does the job! :D

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details