Forums / General / Manageable content for content/search page

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 ;-]

eZ debug

Timing: Jan 18 2025 20:49:04
Script start
Timing: Jan 18 2025 20:49:04
Module start 'content'
Timing: Jan 18 2025 20:49:04
Module end 'content'
Timing: Jan 18 2025 20:49:05
Script end

Main resources:

Total runtime0.8426 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0150 587.8359180.8203
Module start 'content' 0.01510.6679 768.6563605.5625
Module end 'content' 0.68290.1596 1,374.2188337.3750
Script end 0.8426  1,711.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5090210.0002
Check MTime0.00160.1936210.0001
Mysql Total
Database connection0.00130.158210.0013
Mysqli_queries0.738887.67412020.0037
Looping result0.00230.27572000.0000
Template Total0.802395.220.4012
Template load0.00290.344320.0015
Template processing0.799494.869520.3997
Template load and register function0.00020.020510.0002
states
state_id_array0.00130.156310.0013
state_identifier_array0.00110.131620.0006
Override
Cache load0.00250.2949260.0001
Sytem overhead
Fetch class attribute can translate value0.00150.178640.0004
Fetch class attribute name0.00160.191570.0002
XML
Image XML parsing0.00360.427340.0009
class_abstraction
Instantiating content class attribute0.00000.002190.0000
General
dbfile0.01441.7033350.0004
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs