I'm lazy so i'll post this in english only instead of german AND english.
I needed a function to retrieve an article summary directly. So i added a replacement tag called {TEASER:alias}. It returns the article summary of the aliased article using the article summary list template.
great function. Could you tell me how to modify the output. You wrote it uses the article summary list template. How can i make the title of the article "bold" and also have the "more..." link at the end??
Ok, you find the template files for the article summary list in the following directory: /phpwcms_template/inc_cntpart/articlesummary/list
under the condition that you used the default "phpwcms_template" during the installation.
There you find a "sample.tmpl" file. It shows you how to use the replacement tags within the template. I'm using this one f.e.:
My little script uses the function "list_articles_summary" which is a core function of phpwcms. It uses the articlesumary-list template. Actually i have no real idea why your installation uses the articlesummary-article template instead.
Have you changed anything in those functions? Make sure you have chosen the correct template file in the articles properties where it says "Template: article listing:". You should see your own template there in the drop-down box.
I am sure that i didn't change anything in those functions. In the drop down i can see "Standard" which is my template and "sample.html".
But only if i make modifications in the article template it changes something. Nothing happens when changing articlesummary-list....
Perhaps i did something wrong with the integration in the article?? Could you just tell me how to correctly include the replacement tag in the article?
Oh ok, the "Standard" option is no template file but the built in "template". Make a copy of the sample.tmpl and edit the copy to your like. Save it as a .tmpl file in the list folder. Then you should see it in the dropdown box.
I also already tried this and made a "sample2.html" and had it in the drop down. But only changes in "sample2.html" in the article made also changes to the site.
Where do you put "{TEASER:alias}" in your article? In the first content part when creating the article?
In my sample2.html i just can use the {SUMMARY} tag in total. So no chance to just make the headline in bold?!
Any idea why it does still use the article template instead of the article listing? Perhaps i made something wrong creating the article itself???
Ok, i made a complete example for you. I hope this helps:
1) I start with creating the template files in /phpwcms_template/inc_cntpart/articlesummary/list and /phpwcms_template/inc_cntpart/articlesummary/article: http://www.kostal.at/screeny1.png
thank you a lot that you made yourself so much work to help me!!! Unfortunately it didn't help because i still got the same problem...
I made everything exactly how you explained it but it still takes the article template and even if i make an empty article template it still displays the article summary an the headline in the same style?!?! how can that be?
So your replacement tag works fine but it is a template problem. I also reinstalled phpwcms completely but that also didn't change anything. I don't know which template the system exactly uses.
Perhaps anybody has an idea which template that might be and how i could get the system to use the articlelist template???!!
So thank you again very much for your help and sorry that it still doesn't work out...
Greets,
gstar
Well, as a last resort i can only offer you to take alook at your installation directly. You'ld need to give me the adress and maybe a username/password so i can look into it. We can also do it together. (Perhaps you have TeamSpeak? This way w could talk to each other)
If you want this contact me directly via my email. Use the adress i used in the forum.
thanks! Finally the Problem is solved. Just watch out that you choose your template in the article of which the TEASER tag will be displayed and thats it.
Plauderer wrote:Ok, i made a complete example for you. I hope this helps:
1) I start with creating the template files in /phpwcms_template/inc_cntpart/articlesummary/list and /phpwcms_template/inc_cntpart/articlesummary/article: http://www.kostal.at/screeny1.png
It is the summary of an article. It works like the article list. You make the summary in the preferneces of the article itself. There you can also add the picture for the summary/article. Plauderer