- Posts: 5
- Thank you received: 0
Hide show article titles
- nitinvishi
- Topic Author
- Offline
- New Member
Less
More
12 years 3 months ago #889
by nitinvishi
Hide show article titles was created by nitinvishi
Hi,
I was wondering if there is a possibility to show/hide article titles based on the actual article setting.
As of now the config setting in the custom prp component gives the universal option to show or not show article title.
I am using this component to sort news and press release articles by year. Several articles have full text page and several have external website links. I wish to make "title" of these article clickable to maintain content UI.
Therefore, for full text news articles the title parameters in the article would be - Show
While articles with external links (on title click) will basically have the title in the content/text area itself and title parameter set to - Hide
As of now, it can't be done, since the blog layout display is through custom prp layout.
Any suggestions would be helpful
thanks
I was wondering if there is a possibility to show/hide article titles based on the actual article setting.
As of now the config setting in the custom prp component gives the universal option to show or not show article title.
I am using this component to sort news and press release articles by year. Several articles have full text page and several have external website links. I wish to make "title" of these article clickable to maintain content UI.
Therefore, for full text news articles the title parameters in the article would be - Show
While articles with external links (on title click) will basically have the title in the content/text area itself and title parameter set to - Hide
As of now, it can't be done, since the blog layout display is through custom prp layout.
Any suggestions would be helpful
thanks
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
12 years 3 months ago #893
by andrea_4g
Replied by andrea_4g on topic Re: Hide show article titles
Custom Properties does not read article's params, so the result you are looking for is hard to achieve.
IMHO there are 2 solutions:
a) write an output override for CP, that reads the title / look for a 'title' inside the content and render output accordingly accordingly
b) write a CP-type plugin to process results before rendering, adding for each record the 'show title' param gathered from article's param; then write an output override like a), that will render the output according to the param value
b) is more robust than a) but arguably more computational intensive
a) is easier but not as robust, because parsing HTML source is always tricky.
IMHO there are 2 solutions:
a) write an output override for CP, that reads the title / look for a 'title' inside the content and render output accordingly accordingly
b) write a CP-type plugin to process results before rendering, adding for each record the 'show title' param gathered from article's param; then write an output override like a), that will render the output according to the param value
b) is more robust than a) but arguably more computational intensive
a) is easier but not as robust, because parsing HTML source is always tricky.
Please Log in or Create an account to join the conversation.
- nitinvishi
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
12 years 3 months ago - 12 years 3 months ago #895
by nitinvishi
Replied by nitinvishi on topic Re: Hide show article titles
THanks so much for this reply.
Last edit: 12 years 3 months ago by nitinvishi.
Please Log in or Create an account to join the conversation.
Time to create page: 0.124 seconds