Default article as .tmpl

Use GitHub to post feature requests for phpwcms.
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Default article as .tmpl

Post by Kosse »

Hi,

I know this may sound a little odd (or stupid or unconcious), but wouldn't it be simplier to handle (not to code, note the difference) the articles and the way they display if the default article display was in a .tmpl file as well?

It is so easy to change the .tmpl files (sample: summary, list) so you can get a different display.

I always have to alter the core code to make the default article appear differently.

The reason? Well, mainly because people who take care of their website always (or many times) forget to choose the template display:

Image

And their article or article listing appear differently (the default instead of the sample)
I'm not saying that is difficult to just select it (it couldn't be simplier in fact), but as you know we might remember it (because we're used to phpwcms) but normal users DO forget (trust my experience).

Maybe it would be even simplier to be able to assign the sample (or whatever newly create template) as default to "article listing" and "display full article". Is that possible? I guess it is and might be a simplier solution (or maybe it is already possible and I don't know how :roll: )

What do you think about it?

EDITED: is this already scheduled by OG in his roadmap?

Cheers

EDITED: quick link to Jensz solution
http://www.phpwcms.de/forum/viewtopic.php?t=9427
Last edited by Kosse on Thu 15. Dec 2005, 13:23, edited 1 time in total.
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

this has been repoted to Oliver at http://www.phpwcms.de/mantis/, and apparently has been aknowleged by OG. You could add your note there (http://phpwcms.de/mantis/view.php?id=17 once logged in) as well to encourage Oiver to change this.

However these posts don't seem to have cought much attention.
http://phpwcms.de/forum/viewtopic.php?t=6039
http://phpwcms.de/forum/viewtopic.php?t=4013


But to me this is one of the most urgent things that have to be improved!
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

Thanks Spirelli,

didn't see your previous posts, but that's exactly what I meant.
I will post something in Mantis about it.
Happy to see that I'm not the only one struggling with it (feel less lonely 8)

Meanwhile, will see if I can alter the code to set sample template as default :twisted:

Cheers
Last edited by Kosse on Tue 21. Jun 2005, 20:06, edited 1 time in total.
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

Yes, my main concern is that the system should be as easy as possible for anyone to use, regular editors having to know little things like this. Couldn't expect then to set stuff like this each time. Just got a comment today that a person does not find the system easy enough... (Although I find it quite straight forward otherwise).
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

my workaround for this issue is to add .tmpl to line 170 of include/inc_tmpl/article.editsummary.tmpl.php

Code: Select all

echo '<option value="default.tmpl"'.$vals.'>'.$BL['be_cnt_default']."</option>\n";
it automatically assigns defualt.tmpl to the article summary of all newly created articles as if it were selected by hand - you must have a default.tmpl within phpwcms/inc_cntpart/articlesummary/article/ too ;)

It does mean that you will need to 'touch' each existing articles summary to correct the database go into the article summary then save - no editing required)

the fix is the same for the articlesummary list too ...
line 152 of the same file

Code: Select all

echo '<option value="default.tmpl"'.$vals.'>'.$BL['be_cnt_default']."</option>\n";

ps: i use .htm so that dreamweaver shows me pretty coloured syntax :)
Last edited by pSouper on Sat 27. Aug 2005, 22:06, edited 1 time in total.
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Thanks pSouper... you are super :wink:

That's what i'm searching for :!:
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

you're welcome

Remeber to remember this hack everytime you upgrade this file too - or it will revert to the vanilla style default - unless a reall alternative has been included by OG in a future reslease
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

@ pSouper

2 houres every day i'm working on updating the many... many sites, i've made with phpWCMS :cry:

And - doing my work - i'm waiting.....
Waiting for the next update ( 1.2.5-DEV-pre-a.12.800.12-y~0000193) of MY one and only phpWCMS

If you are a phpWCMS fan, that doesn't matter... it's hobby :lol: :lol: :lol: :lol:
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Just a 'hypothetical' modification to admin/templates section interface:

Image

just dreamin'

:D
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

yes yes! ability to modifiy from templates the article listing and summary, yummy yummy

;) :P

Cheers
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

I think this is asking for a default article/listing template to be selected per template ;)

I was thinking it should be per structure instead but I guess if it was processed in line then the template could set the article/list template...if the structure has a set article/list template then this overrides the templates setting and finally if the article has an article/list template this too overrides that of the previous settings.... very flexible and efficient I think
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

pSouper wrote:I think this is asking for a default article/listing template to be selected per template ;)

I was thinking it should be per structure instead but I guess if it was processed in line then the template could set the article/list template...if the structure has a set article/list template then this overrides the templates setting and finally if the article has an article/list template this too overrides that of the previous settings.... very flexible and efficient I think
Yes, even better:

STRUCTURE = PARENT
TEMPLATE = CHILD
ARTICLE = CHILD OF CHILD (GRANDSON ?) :lol:

If nothing, then set default, yes yes...
So the grandson would override the child that would override the parent?Mmmm, like it!
Well, it's not night, so I better keep my eyes open and dream another day ;)
But the idea is clever and would improve/ease the handling of the look of articles. Eventhough I guess to code it is another thing...
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Yes, well articulated....
this feature would get my unconditional thumbs up :D .

(Kosse, I posted a link to this topic in JensZ new mod thread. Hope he gets to read it.)
JensZ
Posts: 136
Joined: Wed 16. Feb 2005, 12:18
Location: Stockholm, Sweden
Contact:

Post by JensZ »

That idea of inheritance seems very flexible and it shouldn't be too hard to code. The way Oliver has structured the code it is pretty easy to make any changes in a short amount of time. I also noticed that he started a new sourceforge project that is striving to use more xml. Xml would be perfect to define these types of things. I am curious to see what his ideas are for the new project...

I would also like to be able select a different page template for articles. In other words, I'd like to be able to override the page template at the structure level with a page template at the article level, in the same manner as you suggested for article templates.

Jens
jscholtysik

Post by jscholtysik »

Hi JensZ,

what new project on Sourceforge do you mean? Keonacms? I know 100% that Oliver Georgi did not start this project. It's a project by cguenther and it will be a possible fork of phpwcms later that is not supported by Oliver Georgi... So why should he support a copy when he is the developer of the original one and only phpwcms...?


Joachim
Locked