Manageable content for content/search page

Author Message

James Robertson

Thursday 08 September 2005 9:02:07 pm

How do I make the content/search page editable (ie. content manageable)?

For example; I want my content manager [person] to be able to change the 'Search Tips' text, without a developer having to modify (hard-coded) text in the content/search.tpl template.

Ɓukasz Serwatka

Thursday 08 September 2005 11:14:38 pm

You can create new content class with attribute "Search tips". Crete somewhere in content structure tree object from that class, and fetch it in content/search.tpl. Than your editor can change "Search tips" by editing object (using on-line editor if available), without interference in to template.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

James Robertson

Sunday 11 September 2005 2:16:31 pm

Hi Lukasz

This doesn't seem to work on any of our (3.4.2) eZ publish sites. I what versions should this feature work?

Arran Price

Sunday 11 September 2005 7:14:51 pm

Hi James,
The way Lukasz is mentioning I believe should work in any ezpublish implementation. Its just fetching the attribute from an object and displaying that attribute in the search form.

I normally do things like what you are asking in a similar manner (and is possibly less clean than Lukasz suggestion), but I dont normally create a custom class. Typically I will:
Override a folder to display the page, such as the search form. I will however put text like your "search tips" in the description field of the folder. Then in my new template (the custom search.tpl) I can fetch the folder and display the description field in the template.
That way, the editor can change the text without any updates being required of the templates.

Hope thats of some help.

Arran

James Robertson

Sunday 18 September 2005 5:21:59 pm

Thanks for the help Arran and Luke. This is basically what I though.

I was hoping for a tidier way. ie. to be able to create a node with a URL alias of content/search.

[BTW my second post regarding versions of eZ publish was a mistake, sorry. I thought I was replying to http://ez.no/community/bugs/remove_draft_objects_created_by_deleted_users. Too many tabs open in Firefox ;-]

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 23:13:27
Script start
Timing: Jan 18 2025 23:13:27
Module start 'layout'
Timing: Jan 18 2025 23:13:27
Module start 'content'
Timing: Jan 18 2025 23:13:28
Module end 'content'
Timing: Jan 18 2025 23:13:28
Script end

Main resources:

Total runtime0.8853 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.0391152.6406
Module start 'layout' 0.00950.0035 740.679739.4766
Module start 'content' 0.01300.8710 780.1563600.4688
Module end 'content' 0.88390.0014 1,380.625012.1250
Script end 0.8853  1,392.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4119160.0002
Check MTime0.00140.1598160.0001
Mysql Total
Database connection0.00090.096810.0009
Mysqli_queries0.809191.3862650.0124
Looping result0.00070.0821630.0000
Template Total0.842395.120.4212
Template load0.00190.214120.0009
Template processing0.840494.928720.4202
Template load and register function0.00020.024410.0002
states
state_id_array0.00180.198110.0018
state_identifier_array0.00130.142820.0006
Override
Cache load0.00160.1824260.0001
Sytem overhead
Fetch class attribute can translate value0.00120.135130.0004
Fetch class attribute name0.00290.324370.0004
XML
Image XML parsing0.01121.266530.0037
class_abstraction
Instantiating content class attribute0.00000.002690.0000
General
dbfile0.01181.3306240.0005
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs