Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:38:20+00:00 2026-05-10T17:38:20+00:00

I have a CakePHP 1.2 application. I’m running into the case where I need

  • 0

I have a CakePHP 1.2 application.

I’m running into the case where I need to do some logic to render things correctly in the view.

Example: I have a table called Types. There are flags for various types, so each row has one or more BOOL fields set. For one type of type, I store the contents of an RTF in another field.

So when I display a listing of all typoes in the view, I want to create a link for the types that are the type where I store RTF. I don’t want to show a link, otherwise.

Where is the best place for this logic?

I want to use html->link to create the link, but I can’t use that inside of my model. Should the logic go in the model, and if so, should I be building HTML in my model, e.g. the link?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:38:20+00:00Added an answer on May 10, 2026 at 5:38 pm

    i’d suggest keeping that logic in the view, building HTML in your model breaks the whole view/model separation. i don’t think there’s anything wrong with view logic, personally i tend to constrain it to basic conditionals.

    ultimately i think the idea is figuring out where this logic best fits. in this case, the logic is, ‘if i have a certain type, i should provide a link to it’, which is a view problem, not a model problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 103k
  • Answers 103k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer After long tedious trials My advise to anyone who is… May 11, 2026 at 8:26 pm
  • Editorial Team
    Editorial Team added an answer This will require a combination of a for loop and… May 11, 2026 at 8:26 pm
  • Editorial Team
    Editorial Team added an answer In httpd.conf add (or change if it's already there): AddDefaultCharset… May 11, 2026 at 8:26 pm

Related Questions

I have a CakePHP 1.2 application. I'm running into the case where I need
I've installed the CakePHP core files in this folder: /home/iopener/webapps/cake_1.2.1.8004 I've got my app
I have the need to create the functionality to allow my registered users to
I've got a CAkePHP 1.2 site. I've got three related Models/tables: A Comment has
I've got a simple CakePHP site (1.2) . I've got a page where you

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.