Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 10:36:19 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155556 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News module, hide other sections when reading  (Read 371 times)
noname8

Offline Offline

Posts: 75


« on: October 18, 2011, 10:16:16 AM »

I'm making a site with a front page of 3 sections, wysiwyg, poll, and news

is it possible to hide the wysiwyg+poll sections (all the other sections than the news)  if i click the read more... link of one of the news posts ??

Logged
dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #1 on: October 18, 2011, 10:27:30 AM »

you could put the source-code of wysiwyg into the head of news-section (options).
hide poll-section and take droplet sectionpicker for head of news-section.
« Last Edit: October 18, 2011, 10:29:59 AM by dbs » Logged

noname8

Offline Offline

Posts: 75


« Reply #2 on: October 18, 2011, 01:47:14 PM »

Not quite understand.
I think that the users don't know how to edit the page if it isn't real wysiwyg.

Hasn't wb has some kind of php ob buffer ? I could modify the news view.php to remove content from the buffer.. ?
Logged
instantflorian
Betatester
*
Offline Offline

Posts: 804



WWW
« Reply #3 on: October 18, 2011, 05:02:41 PM »

Hi,

you can build the start page with wysywig, poll and a code section with the Anynews module.
Then you create an own page for the news module without all the other stuff.

hth
_florian.
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #4 on: October 18, 2011, 06:52:53 PM »

is it possible to hide the wysiwyg+poll sections (all the other sections than the news)  if i click the read more... link of one of the news posts ??

It's possible but it is a little bit tricky and I don't know if you want go this way.

In order to do this you'll need some modification in your template (index.php and info.php - you will need to add a new block).

Once your Template is modified, you will set the section where your News module is in to the new created block.
Than, the modifications of the index.php will rule that only the block is shown if you are in the news full content mode.

This way is most constant, however it takes some time to get there.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
noname8

Offline Offline

Posts: 75


« Reply #5 on: October 18, 2011, 09:37:59 PM »

Stefek, How can i detect in the template's index.php that now it is the news that is opened?

Because i already have the poll in the 2nd block so it's not a big deal to make 3rd one for the news.
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #6 on: October 18, 2011, 09:48:17 PM »

You can detect it with the constant 'POST_ID'.

Code:
<?php

if (defined('POST_ID')){

 echo 
'this is the post long text view';

}

Hope this helps.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
noname8

Offline Offline

Posts: 75


« Reply #7 on: October 19, 2011, 12:29:16 PM »

Thank you very much! simple and working way that was.

Code:
<?php 
if(!defined('POST_ID') && $page_id ==429) { // //front pages id is 429

echo '<div id="poll">';
page_content(3); 
echo '</div>';
}
?>
<!-- Content Block 3 - POLL  -->


<?php if(!defined('POST_ID'))page_content(1); ?> <!-- Content Block 1, main -->
<?php page_content(2); ?> <!-- Content Block 2 The news-->

Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #8 on: October 19, 2011, 12:35:56 PM »

Cool.

I'm glad you figured it out youself.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!