Search

A new extension, "Backend Views" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

Achtung, achtung! This extension is still in beta, so bugs are expected. If you are so kind to test it and report me any issues (preferably on GitHub), you'd be my hero!

Acthung, acthung!

Gesundheit!

This extension comes with a small library that, in a few words, is a quick re-write of the DS engine bundled with Symphony. It's class-based and provides a small interface to format the result of the execution of a single datasource.

Note: Grouping and DS Chaining aren't supported at the moment. Moreover, I need to complete the support for pagination. :) (Done!)

The default implementation is the class DatasourceFormatHTML that renders a classic backend table. However, If you feel courageous enough, it is possible to write other implementations such as DatasourceFormatJSON or DatasourceFormatXML.

For more info, feel free to ask. :)

Moreover, I need to complete the support for pagination. :)

And... done!

I get just a blank site if i want view a "backendView" Must I write a template first ?

No, no need for templates. Once the extension is enabled, go to Preferences and choose which views (datasources) you want to activate. A new Views menu will appear in the main navigation listing the views you have activated.

I have no idea .. i get just a blank page in Firefox and chrome says

HTTP-Fehler 500 (Internal Server Error):

This is my htaccess .. but this is the standard symphony htaccess `

Symphony 2.2.x

Options +FollowSymlinks -Indexes

RewriteEngine on
RewriteBase /

### SECURITY - Protect crucial files
RewriteRule ^manifest/(.*)$ - [F]
RewriteRule ^workspace/utilities/(.*).xsl$ - [F]
RewriteRule ^workspace/pages/(.*).xsl$ - [F]
RewriteRule ^(.*).sql$ - [F]
RewriteRule (^|/). - [F]

### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico"
RewriteCond %{REQUEST_FILENAME} favicon.ico [NC]
RewriteRule .* - [S=14]

### IMAGE RULES
RewriteRule ^image/(.+.(jpg|gif|jpeg|png|bmp))$ extensions/jit_image_manipulation/lib/image.php?param=$1 [L,NC]

### CHECK FOR TRAILING SLASH - Will ignore files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]

### URL Correction
RewriteRule ^(symphony/)?index.php(/.*/?) $1$2 [NC]

### ADMIN REWRITE
RewriteRule ^symphony/?$ index.php?mode=administration&%{QUERY_STRING} [NC,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^symphony(/(.*/?))?$ index.php?symphony-page=$1&mode=administration&%{QUERY_STRING}   [NC,L]

### FRONTEND REWRITE - Will ignore files and folders
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/?)$ index.php?symphony-page=$1&%{QUERY_STRING}    [L]

#

`

Please try enabling PHP errors.

thank you nick,

get this:

Fatal error: Call to a member function get() on a non-object in .../symphony/extensions/backend_views/lib/class.datasourceformatHTML.php on line 13

Backend Views updated to version 0.1.1 on 17th of June 2011

  • A bunch of fixes (thanks @brendo!)

@quma: Grab the latest version and see if the problems still occurs. If yes, please let me know :)

Symphony Recoverable Error Argument 1 passed to Widget::TableBody() must be an array, null given, called in .../symphony/extensions/backend_views/content/content.view.php on line 71 and defined

An error occurred in .../symphony/symphony/lib/toolkit/class.widget.php around line 288

Argument 1 passed to Widget::TableBody() must be an array, null given, called in ... /symphony/extensions/backend_views/content/content.view.php on line 71 and defined .../symphony/symphony/lib/toolkit/class.widget.php line 288

283      *  the key being the name and the value being the value of the attribute.
284      *  Attributes set from this array will override existing attributes
285      *  set by previous params.
286      * @return XMLElement
287      */
288     public static function TableBody(Array $rows, $class = null, $id = null, Array $attributes = null){
289         $tbody = new XMLElement('tbody');
290
291         if($class) $tbody->setAttribute('class', $class);
292         if($id) $tbody->setAttribute('id', $id);

Backtrace:

[.../symphony/symphony/lib/toolkit/class.widget.php:288] GenericErrorHandler::handler();
[.../symphony/extensions/backend_views/content/content.view.php:71] Widget::TableBody();
[.../symphony/symphony/lib/toolkit/class.administrationpage.php:260] contentExtensionBackend_viewsView->view();
[.../symphony/symphony/lib/core/class.administration.php:222] AdministrationPage->build();
[.../symphony/symphony/lib/core/class.administration.php:375] Administration->__buildPage();
[.../symphony/index.php:25] Administration->display();

Can you var_dump($result);die; after line 66?

After that, take it back out and what happens if you change line 66 to

$records = $format->getFormattedRecords() || array();

Thanks @quer, this commit should fix your error.

@designermonkey: Yep, you are on the right track. I forgot to update an if statement responsible for checking whether the array of records is empty. Instead of array(), however, I preferred to show a simple "None found" message as in the Symphony tradition.

None found

Well I never knew that! how does it get passed into the Table widget then? (I'm still learning)

how does it get passed into the Table widget then?

This way:

Widget::TableRow(array(
    Widget::TableData(
        __('None found.'),
        'inactive',
        NULL,
        count($aTableHead)
    )
));

With count($aTableHead) being the value for the colspan attribute.

Thanks @quer, this commit should fix your error.

@ekoes thank you too ... now its works

I use for title, teaser and body the text box

extension but "backend view" dont show this fields, is this a bug or backend view dont support other fields ?

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