Click here to Skip to main content
15,891,943 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Fresher in Web Development Pin
Navneet k soni27-Jan-14 20:11
Navneet k soni27-Jan-14 20:11 
GeneralRe: Fresher in Web Development Pin
Mahi Bhat28-Jan-14 17:01
professionalMahi Bhat28-Jan-14 17:01 
GeneralRe: Fresher in Web Development Pin
Navneet k soni28-Jan-14 22:47
Navneet k soni28-Jan-14 22:47 
SuggestionRe: Fresher in Web Development Pin
thatraja29-Jan-14 4:05
professionalthatraja29-Jan-14 4:05 
AnswerRe: Fresher in Web Development Pin
thatraja27-Jan-14 22:25
professionalthatraja27-Jan-14 22:25 
GeneralRe: Fresher in Web Development Pin
Mahi Bhat28-Jan-14 17:03
professionalMahi Bhat28-Jan-14 17:03 
AnswerRe: Fresher in Web Development Pin
W Balboos, GHB14-Feb-14 8:01
W Balboos, GHB14-Feb-14 8:01 
QuestionTemplate 1.4.1 - How to render the same layout without retyping all write command. Pin
dudz artiaga18-Jan-14 22:01
dudz artiaga18-Jan-14 22:01 
Hi Everyone,

I am new to web development and I have simple question regarding Template 1.4.1.

I have 7 regions as shown below. My default controller renders those regions in template and it was good (See index method below). However, I would like to see the same layout, but with different content. Exactly the same except for content region.

I am wondering if there's a way I can achieve what I want without writing again the same command in index method. A one liner code probably or two. Can you show me how?

I tried the override in write_view and I can't make it work or I misunderstood the use of it. See add function below.

[code]
$template['default']['regions'] = array(
   'headerstyles',
   'header',
   'banner',
   'rightfilter',
   'content',
   'scripts',
   'footer',
);
[/code]

Index method
[code]
public function index()
 {
    $this->template->write_view('headerstyles', 'headerStyles');
    $this->template->write_view('header', 'header');
       $this->template->write_view('scripts', 'scripts');
       $this->template->render();
 }
[/code]
Add function. addItem is existing and elements in addItem is rendered but without the other regions.

[code]
public function add()
    {
        $this->template->write_view('content','addItem','',true);
        $this->template->render();
    }
[/code]

Thank you very much!

QuestionVertically aligning elements in the Twiter Bootstrap Navbar Pin
JMK8918-Jan-14 6:50
professionalJMK8918-Jan-14 6:50 
AnswerRe: Vertically aligning elements in the Twiter Bootstrap Navbar Pin
vbmike19-Jan-14 4:08
vbmike19-Jan-14 4:08 
QuestionNeed to get the parameter from URl to build href. Pin
Member 1052381615-Jan-14 7:38
Member 1052381615-Jan-14 7:38 
AnswerRe: Need to get the parameter from URl to build href. Pin
Izu Great30-Jan-14 12:57
professionalIzu Great30-Jan-14 12:57 
Questionhow do i Pin
megateck3312-Jan-14 11:38
megateck3312-Jan-14 11:38 
AnswerRe: how do i Pin
Richard MacCutchan12-Jan-14 22:49
mveRichard MacCutchan12-Jan-14 22:49 
AnswerRe: how do i Pin
thatraja13-Jan-14 0:00
professionalthatraja13-Jan-14 0:00 
AnswerRe: how do i Pin
tgsb14-Jan-14 18:55
tgsb14-Jan-14 18:55 
Questionhow to set default og:image? Pin
Jassim Rahma10-Jan-14 9:54
Jassim Rahma10-Jan-14 9:54 
QuestionAny advice for embedding a blog into a website Pin
JMK899-Jan-14 5:06
professionalJMK899-Jan-14 5:06 
AnswerRe: Any advice for embedding a blog into a website Pin
David Mujica9-Jan-14 5:47
David Mujica9-Jan-14 5:47 
Questionwhich social meta tag standard to use? Pin
Jassim Rahma8-Jan-14 11:53
Jassim Rahma8-Jan-14 11:53 
QuestionBig size Javascript Loadings Pin
Talglan29-Dec-13 2:09
Talglan29-Dec-13 2:09 
AnswerRe: Big size Javascript Loadings Pin
User 171649229-Dec-13 4:43
professionalUser 171649229-Dec-13 4:43 
Questionhow to file_get_contents in email body Pin
Jassim Rahma27-Dec-13 10:37
Jassim Rahma27-Dec-13 10:37 
AnswerRe: how to file_get_contents in email body Pin
W Balboos, GHB18-Feb-14 5:19
W Balboos, GHB18-Feb-14 5:19 
Questionis this a valid url for sitemap.xml? Pin
Jassim Rahma23-Dec-13 11:13
Jassim Rahma23-Dec-13 11:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.