6 Posts
chico
8 years ago
Topic

Hi everybody.

I have been struggeling for about two days now to make a template override to work on the seb_one template.

I have made a “List & Search” type named “test_search” with the style name “seb_blog - test_search (list)” in the “List->template” view.

In the seb_one/positions/ I have created the test_search folder and the intro folder.

I have put all of my output into the #MAINBODY position so for now I should have my custom output in the

seb_one/positions/test_search/mainbody.php

However I can not make this work, and I have searched the forums and the documentations without any luck.

According to the documentation and the forum posts everything seems to be right.

I would be most thankful for any help.

Get a Book for SEBLOD
41 Posts
Umair Hassan
8 years ago
4
Level 1

Hi Chico,

For List and Search Type Override you have to use Seb_blog or Seb_Table Template.

The standard structure for Search Type Override should be like following:

templates/[the_name_of_your_template]/positions/[your_content_type]/[view]


For your case:

templates/seb_blog/positions/test_search/item/mainbody.php

also don't forget to add a blank index.html file in the folders.


Hope the above will work.


Regards,

Umair


6 Posts
chico
8 years ago
3
Level 2

Hi Umair.

Thank you very much for your answer.

Sadly I have already tried both of those options, and none of them worked for me.

I have also created the empty index.html files :-)

However, I have picked up a lot of php-cgi related chatter in my error log (apache php).

It's a lot of “undefined indexes” and “trying to get property of non-object” from different files in my subfolders of “/plugins/cck_storage_location/” , so obviusly something is happening.

I will make some experiments and get back with my progress och faliure.


6 Posts
chico
8 years ago
0
Level 3

As it turned out, the messages in my logs was no biggy, there was just some uninitiazed _POST
So still, my system does not answer om custom template position overrides.
Now I am using the seb_blog.

6 Posts
chico
8 years ago
1
Level 3

Ok, I have now made some tests.

The template override works well for the content scope for the article type.

So I have to redefine my question.

Why doesn't my template override work for a list / search.

it should be templates/[the_name_of_your_template]/positions/[your_search_type]/[view]

However, it does not work.

/C

6 Posts
chico
8 years ago
0
Level 4

Ok.I finally figured it out!

The override must be done in seb_one, not in the Seb_blog or Seb_Table templates.

For a list and search, named : test_search
seb_one/position/test_search/item/position_to_override.php
seb_one/position/test_search/search/position_to_override.php

Wich meens in my case:

seb_one/positions/test_search/item/mainbody.php

for my custom output of my list / search

Just for reference if anybody vill have the same problem.

/C


251 Posts
Viktor Iwan
8 years ago
4
Level 1

Just wanted to give a hint if you "get lost" on where you want to do position override:

1. open libraries/cck/rendering/rendering.php

2. go to line around 676 where you find a line:
$pos2     =   $this->path.'/positions/'.$this->type.'/'.$this->client.'/'.$position.'.php';

3. after this line, you can add:

echo $pos2;

4. look at your front end.. it will display where the path that been looking by seblod for position override...


6 Posts
chico
8 years ago
1
Level 2

Well thank you Iwan.

As I am new to SeBlod and there has been a steep learning curve, and it's been a while since I used my coding skills, so I am kind of dull right now, byt it willl wear of eventuatly.

Acctually, this is my first SeBlod project, and I am impressed of the power of SeBlod, but not by the documentation.

However, just to clarify and for future reference..

Full path of the mentioned file:

{joomla_install_path}/libraries/cck/rendering/rendering.php

Thank you again for the hint.

/C

251 Posts
Viktor Iwan
8 years ago
0
Level 3

Don't worry mate !... Everyone was a beginner... I still got a lot of things to cover as well.. that's why we're all here...

137 Posts
Stef
7 years ago
0
Level 2

That's the kind of tip i love ! :)

Thank you Viktor

53 Posts
codekadiya
5 years ago
0
Level 2

Thank you so much viktor now this code is in Line 782

1 Post
loranger
7 years ago
1
Level 1
Ok I got it ok for the frontend display, it's fully customized in my search list, I followed the advise above. thank you for this.

However, now when I click on an article in the backend, I get an empty page, so I don't know what to do to fix this, I looked at the apache log and no error.

When we override the frontend, do we have to also override the backend to have complete set of customized template for one given content type?

Is there a way I can activate log, debug somewhere in order to visualize why my web page is blank when I open an article from the backend?

thank you
684 Posts
rpoy
7 years ago
0
Level 2
Hi loranger,

Welcome to the SEBLOD forums.

You do not need to override the backend for a "set".   What exactly do you mean by blank.  Is the entire site blank or are there missing fields?  If the fields are missing, make sure that your fields have been added to your Admin section of your content type.

You can also turn on the debug options under Global Configuration>System>Debug System
and
Global Configuration > SEBLOD>Site> Debug

Hope that helps,

Randy



Get a VIP membership