Search

Hi, people!

Who can tell how to use the function "fetchByPage ()" section to get to the field "Select Box Link", including all data in this field?

<news>
  <entry>
     <title>This is Title</title>
     <category>
        <title>This is Category Title</title>
        <url>this-is-category-url</url>
     </category>
  </entry>
</news>

What exactly are you trying to accomplish? Do you really need to do this in PHP? Can't it be done via a standard Data Source?

"Included in Elements" (Data Source). I specify the field types (Select Box Link), which contains the fields "Title" and "Url", but the result falls just:

<category>
     <item id="22" handle="halloween" section-handle="category-of-recipes" section-name="Category of Recipes">Halloween</item>
   </category>

Yep, you want to use datasource chaining to get further information about those entries. The SBL does not do this automatically for performance reasons, and because it's not necessary with chaining.

Thanks, brendo!

Please correct me if I'm wrong. Using the "datasource chaining" leads to an increase in the number of database queries and more complex xsl-code.

So I want to write by hand the data source to create a simpler structure (XML), respectively, to use more simple words by code (XSL). And performance.

Chaining won't use that many more queries than if you write it by hand using Symphony's class API methods, because the objects still need to be built. If you want to reduce the number of database queries, you should join the tables and query the database directly...

Thank you nickdunn!

Now, I'm doing something like this:

  • Create the data (sections)
  • Create a data source (with interface), using filters, output options, etc.
  • Relating the sources to each other (output options)
  • Test output (filtering, selection)
  • Analyze the database queries and optimize them (reducing the number of requests)
  • Manually edit data sources to extract the parameters, perform direct queries to the database and construct (XML). In this part of the data source is deleted as unnecessary. Or simply remain the only source of data.
  • Forbid changing the data source via an interface (use "allowEditorToParse()")

The advantage: performance, flexible management of structure (XML) Disadvantages: hard-coded names of the tables in the database, the prohibition of editing the data source through the interface

Please correct me if I'm wrong.

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