Usign Site Builder features instead of default item_list.tpl

sekeri
sekeri
@ilker
9 years ago
334 posts
When I set the url = www.mysite.com/articles for a menu item I can not use the site builder features anymore for it because it automatically uses item_list.tpl and I need to design it using item_list.tpl.

Is there a way of using site builder layouts, widgets etc.. for this url instead of the item_list template?

I hope my question is clear enough?

updated by @ilker: 12/22/16 11:55:59AM
michael
@michael
9 years ago
7,750 posts
not particularly clear :) but I'll try.

You've set the menu url to 'articles'
NAME: Articles
URL: articles

and you cant use the Site Builder features on that page. You want to know why right?

The order of priority for a URL goes:
* does the skin have any templates named articles.tpl YES = use that. NO = check modules
* are there any modules that use /articles/ as their base YES = use that. NO = Site Builder
* does a page already exist in Site Builder for /articles YES = use that. NO = Create a new Site Builder page here.

So you probably already have a skin template in your active skin articles.tpl
updated by @michael: 03/09/15 01:48:59PM
sekeri
sekeri
@ilker
9 years ago
334 posts
I think you got it. Please let me give more details;
I have an Aparna module which is articles.
name:articles
url:articles

When I create a menu using the url articles I can not use Site Builder anymore. Because it uses item_list.tpl by default. My request is to be able to use Site Builder here as well.

Additionally, it does not let Site Builder features to be used for sub menus/urls for this item too. For example it does not let me to use Site Builder for
www.mysite.com/articles/
and also for;
www.mysite.com/articles/chords
www.mysite.com/articles/scales
..etc.

I wan't to use Site Builder features. :)
michael
@michael
9 years ago
7,750 posts
Thats because the url is already taken. Use a different url and you can put what you want.

your aprana module already controls that url. so you'd need to use a different url.

Could try deleting the index.tpl file from your module. That might free up the url.
updated by @michael: 03/09/15 11:30:22PM
sekeri
sekeri
@ilker
9 years ago
334 posts
I have updated the module url as article(from articles). Now it works! I hope not to see any side affects :)
sekeri
sekeri
@ilker
9 years ago
334 posts
Michael, I think I have found something that could be a side effect.

Module: Lessons
Module URL : lesson
Menu entry : www.mysite.com/lessons (in order to use Site Builder because /lesson goes to default template)

Lesson categories:
www.mysite.com/lessons/chords
www.mysite.com/lessons/scales

specific lesson url:
http://www.mysite.com/user1/lesson/333/how-to-play-blues-guitar (here we dont have an 's' at the end)

and also
http://www.mysite.com/lesson is still available for search engines and the users..

if I change the skin to Elastic or another one www.mysite.com/lessons will return nothing

So that in my opinion; you need to provide an option how to use module url; with default template or site builder. Profile based listing should be the same.
michael
@michael
9 years ago
7,750 posts
Seams like your kind of mixing 2 things, Site Builder and your module Lessons.

When creating a module one of the things that a module does is to have a default display page for all of its stuff.

Eg, the gallery module decides to display its stuff like this:
http://demo.jamroom.net/jrNova/gallery

The reason that stuff is formatted in the way it is is because the modules index.tpl file found at:
/modules/jrGallery/index.tpl

chooses to display it like that. So its the MODULE that says how the modules stuff should be formatted. There are no restrictions on it.

What you seam to want to do is to not provide a default index.tpl system in the module, but rather leave that page's formatting to another group of modules, the Site Builder system.

Its a bit un-expected.

If you really want to do it this way, I would suggest adding site builder setup to the modules index.tpl page.

"Making a skin site builder ready"
https://www.jamroom.net/site-builder/documentation/development/2349/making-a-skin-site-builder-ready

and add:
{jrPanel_display name="lesson"}
to the modules index.tpl file to make Site Builder control the index page.

Remember though that Site Builder doesn't work on profiles, its for building the top level content.
sekeri
sekeri
@ilker
9 years ago
334 posts
Thank you Michael. It is clear now. I will try not to go out of the standards as much as possible. I think this is the best way.
michael
@michael
9 years ago
7,750 posts
Its actually a great question. I'd never considered using the Site Builder to put a page on a module's index.tpl page, but there's no reason it wouldn't work.

Give it a go. Just 'coz I didn't think of it doesn't mean its wrong. :)

--edit--
Maybe use the module URL as the panel name so it doesnt break if the modules URL is changed.

{jrCore_module_url module="xxLesson" assign="murl"}
{jrPanel_display name=$murl}

updated by @michael: 03/11/15 11:52:15PM
sekeri
sekeri
@ilker
9 years ago
334 posts
Actually my first question was that if you can put this option into the config so that it can be disabled/enabled easily without needing any coding. Am I lazy :)
michael
@michael
9 years ago
7,750 posts
nope, this is pushing the boundaries. You're creating new ways of building modules that I didn't even think of. ;)

Maybe if Site Builder becomes the standard way then we can think of putting it in, but not yet.

The main issue is that when building modules, usually its the module builder who builds that default layout for the users of the module. You're approaching it from the point of view where you are both the module builder AND the module user.

If a user who is not the module builder went to that page they would expect something to be there for them already, not a page for them to create.
sekeri
sekeri
@ilker
9 years ago
334 posts
michael:
If a user who is not the module builder went to that page they would expect something to be there for them already, not a page for them to create.

A user can expect something to be there for them already and can find, no problem about that. But it does not mean that he should not be able to change it using Site Builder if he wants.

Anyway, this is my approach. Because I don't know what is behind deeply I may be too demanding and pushing the boundries. :) Thanks..
michael
@michael
9 years ago
7,750 posts
I can see what your saying. Its a good idea, the system is Site Builder system is just not stable enough for this yet.

It would require the user to not only install the module, but also update the system with an export of what the module designer wanted the top page to look like. If it was handled by an event listener that installed the default setup when the module was installed, its a great idea.

I just think its a bit ahead of its time yet. There currently is no system in place that checks for modules to have default setups for Site Builder so each module creator would need to do the setup themselves. It would be better to include this as a default system to make it real easy on module creators. Its just not there yet.

I know about it now though, so will try to get something in in a future release. Great idea. :)

Tags